diff --git a/.github/workflows/daemon_tests.sh b/.github/workflows/daemon_tests.sh new file mode 100644 index 0000000000..8fff830eed --- /dev/null +++ b/.github/workflows/daemon_tests.sh @@ -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 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index f8805d2000..c8d55d95fd 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -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: @@ -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 diff --git a/.github/workflows/tests_nightly.sh b/.github/workflows/tests_nightly.sh index bca229b0b3..2939f3b8e7 100755 --- a/.github/workflows/tests_nightly.sh +++ b/.github/workflows/tests_nightly.sh @@ -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/