diff --git a/.github/config/add-singularity.yaml b/.github/config/add-containerized.yaml similarity index 67% rename from .github/config/add-singularity.yaml rename to .github/config/add-containerized.yaml index e8b20d7fad..cc8cd882b4 100644 --- a/.github/config/add-singularity.yaml +++ b/.github/config/add-containerized.yaml @@ -3,7 +3,7 @@ description: Bash run in Docker image through Singularity default_calc_job_plugin: core.arithmetic.add computer: localhost filepath_executable: /bin/sh -image_name: docker://alpine:3 -engine_command: singularity exec --bind $PWD:$PWD {image_name} +image_name: alpine:3 +engine_command: docker run --user 1001:100 -v $PWD:$PWD -w $PWD -i {image_name} prepend_text: ' ' append_text: ' ' diff --git a/.github/workflows/tests_nightly.sh b/.github/workflows/daemon_tests.sh similarity index 87% rename from .github/workflows/tests_nightly.sh rename to .github/workflows/daemon_tests.sh index 2712a5124e..8fff830eed 100755 --- a/.github/workflows/tests_nightly.sh +++ b/.github/workflows/daemon_tests.sh @@ -12,5 +12,3 @@ 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/ diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4f1fc0750f..787793a951 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -27,7 +27,7 @@ jobs: nightly-tests: if: github.repository == 'aiidateam/aiida-core' # Prevent running the builds on forks as well - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 services: postgres: @@ -55,9 +55,6 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: eWaterCycle/setup-singularity@v7 # for containerized code test - with: - singularity-version: 3.8.7 - name: Install system dependencies run: sudo apt update && sudo apt install postgresql @@ -72,15 +69,23 @@ jobs: - name: Setup environment run: .github/workflows/setup.sh - - name: Run tests - id: tests - run: .github/workflows/tests_nightly.sh + - name: Run pytest nigthly tests + id: pytest-tests + env: + AIIDA_TEST_PROFILE: test_aiida + AIIDA_WARN_v3: 1 + run: | + pytest --db-backend psql -m nightly tests/ + + - name: Run daemon nightly tests + id: daemon-tests + run: .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 # pull requests that come from forks. This is a limitation of secrets on GHA - if: always() && (steps.install.outcome == 'failure' || steps.tests.outcome == 'failure') && env.SLACK_WEBHOOK != null + if: always() && (steps.install.outcome == 'failure' || steps.pytest-tests.outcome == 'failure' || steps.daemon-tests.outcome == 'failure') && env.SLACK_WEBHOOK != null uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index aaa0228d36..9f2b22f35c 100755 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -19,7 +19,7 @@ verdi computer configure core.local localhost --config "${CONFIG}/localhost-conf verdi computer test localhost verdi code create core.code.installed --non-interactive --config "${CONFIG}/doubler.yaml" verdi code create core.code.installed --non-interactive --config "${CONFIG}/add.yaml" -verdi code create core.code.containerized --non-interactive --config "${CONFIG}/add-singularity.yaml" +verdi code create core.code.containerized --non-interactive --config "${CONFIG}/add-containerized.yaml" # set up slurm-ssh computer verdi computer setup --non-interactive --config "${CONFIG}/slurm-ssh.yaml"