Skip to content

Commit

Permalink
Separate daemon nightly test and pytest nightly test
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Jan 15, 2025
1 parent 0a2699c commit a15d772
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/daemon_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -ev

# Make sure the folder containing the workchains is in the python path before the daemon is started
SYSTEM_TESTS="${GITHUB_WORKSPACE}/.github/system_tests"
MODULE_POLISH="${GITHUB_WORKSPACE}/.molecule/default/files/polish"

export PYTHONPATH="${PYTHONPATH}:${SYSTEM_TESTS}:${MODULE_POLISH}"

verdi daemon start 4
verdi -p test_aiida run ${SYSTEM_TESTS}/test_daemon.py
verdi -p test_aiida run ${SYSTEM_TESTS}/test_containerized_code.py
bash ${SYSTEM_TESTS}/test_polish_workchains.sh
verdi daemon stop
11 changes: 6 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
nightly-tests:

# if: github.repository == 'aiidateam/aiida-core' # Prevent running the builds on forks as well
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

services:
postgres:
Expand Down Expand Up @@ -73,13 +73,14 @@ jobs:
- name: Setup environment
run: .github/workflows/setup.sh

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

- name: Run tests
- name: Run pytest nigthly tests
id: tests
run: .github/workflows/tests_nightly.sh

- name: Run daemon nightly tests
id: tests
run: source .venv/bin/activate && .github/workflows/daemon_tests.sh

- name: Slack notification
# Always run this step (otherwise it would be skipped if any of the previous steps fail) but only if the
# `install` or `tests` steps failed, and the `SLACK_WEBHOOK` is available. The latter is not the case for
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/tests_nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,4 @@ MODULE_POLISH="${GITHUB_WORKSPACE}/.molecule/default/files/polish"

export PYTHONPATH="${PYTHONPATH}:${SYSTEM_TESTS}:${MODULE_POLISH}"

verdi daemon start 4
# verdi -p test_aiida run ${SYSTEM_TESTS}/test_daemon.py
verdi -p test_aiida run ${SYSTEM_TESTS}/test_containerized_code.py
# bash ${SYSTEM_TESTS}/test_polish_workchains.sh
# verdi daemon stop

# AIIDA_TEST_PROFILE=test_aiida pytest --db-backend psql -m nightly tests/
AIIDA_TEST_PROFILE=test_aiida pytest --db-backend psql -m nightly tests/

0 comments on commit a15d772

Please sign in to comment.