Skip to content

Commit

Permalink
Add CI configuration for AiiDA 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed May 10, 2022
1 parent 02dbbc3 commit 03ef91b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/aiida/setup_aiida.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -ev
CONFIG="${GITHUB_WORKSPACE}/.github/aiida"
sed -i "s|PLACEHOLDER_BACKEND|${AIIDA_TEST_BACKEND}|" "${CONFIG}/profile.yaml"
sed -i "s|PLACEHOLDER_PROFILE|test_${AIIDA_TEST_BACKEND}|" "${CONFIG}/profile.yaml"
sed -i "s|PLACEHOLDER_DATABASE_NAME|test_${AIIDA_TEST_BACKEND}|" "${CONFIG}/profile.yaml"
sed -i "s|PLACEHOLDER_DATABASE_NAME|test_aiida|" "${CONFIG}/profile.yaml"
sed -i "s|PLACEHOLDER_REPOSITORY|/tmp/test_repository_test_${AIIDA_TEST_BACKEND}/|" "${CONFIG}/profile.yaml"

verdi setup --config "${CONFIG}/profile.yaml"
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
postgres:
image: postgres:10
env:
POSTGRES_DB: test_django
POSTGRES_DB: test_aiida
POSTGRES_PASSWORD: test
options: >-
--health-cmd pg_isready
Expand Down Expand Up @@ -208,13 +208,21 @@ jobs:
- name: Install adapter conversion dependencies
run: |
pip install -r requirements-client.txt
# AiiDA-specific
reentry scan
- name: Setup up environment for AiiDA
- name: Setup environment for AiiDA v1 (Python 3.7)
if: matrix.python-version == 3.7
env:
AIIDA_TEST_BACKEND: django
run: .github/aiida/setup_aiida.sh
run: |
reentry scan
.github/aiida/setup_aiida.sh
- name: Setup environment for AiiDA v2 (Python 3.8+)
if: matrix.python-version != 3.7
env:
AIIDA_TEST_BACKEND: psql_dos
run: |
.github/aiida/setup_aiida.sh
- name: Run previously skipped tests for adapter conversion
run: pytest -rs -vvv --cov=./optimade/ --cov-report=xml --cov-append tests/adapters/
Expand Down

0 comments on commit 03ef91b

Please sign in to comment.