-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
89 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: ci | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
python-version: | ||
- 3.8 | ||
- 3.6 | ||
|
||
services: | ||
postgres: | ||
image: postgres:12 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: >- | ||
sudo apt-get install -y | ||
build-essential | ||
php7.4-cli | ||
haskell-platform | ||
fp-compiler | ||
python2.7 | ||
cppreference-doc-en-html | ||
cgroup-lite | ||
libcap-dev | ||
python-dev | ||
libpq-dev | ||
libcups2-dev | ||
libyaml-dev | ||
rustc | ||
mono-mcs | ||
- name: Install requirements | ||
run: | | ||
pip install -U pip setuptools wheel | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
sudo $(which python) prerequisites.py -y --cmsuser=$USER install | ||
python setup.py install | ||
- name: Set up database | ||
env: | ||
PGPASSWORD: postgres | ||
run: | | ||
psql --host=localhost --username=postgres --command="CREATE USER cmsuser WITH PASSWORD 'your_password_here';" | ||
createdb --host=localhost --username=postgres --owner=cmsuser cmsdb | ||
psql --host=localhost --username=postgres --dbname=cmsdb --command='ALTER SCHEMA public OWNER TO cmsuser' | ||
psql --host=localhost --username=postgres --dbname=cmsdb --command='GRANT SELECT ON pg_largeobject TO cmsuser' | ||
createdb --host=localhost --username=postgres --owner=cmsuser cmsdbfortesting | ||
psql --host=localhost --username=postgres --dbname=cmsdbfortesting --command='ALTER SCHEMA public OWNER TO cmsuser' | ||
psql --host=localhost --username=postgres --dbname=cmsdbfortesting --command='GRANT SELECT ON pg_largeobject TO cmsuser' | ||
cp ./config/cms.conf.sample ./config/cms.conf | ||
sed -e "s/\"cmsuser\": \"cmsuser\"/\"cmsuser\": \"$USER\"/" -i ./config/cms.conf | ||
cmsInitDB | ||
- name: Run tests | ||
run: | | ||
cmsRunTests -v --coverage --codecov |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters