Skip to content

nightly

nightly #2110

Workflow file for this run

name: nightly
on:
schedule:
- cron: 0 0 * * * # Run every day at midnight
pull_request:
paths:
- .github/workflows/nightly.yml
- .github/workflows/setup.sh
- .github/system_tests/test_daemon.py
- .molecule/default/files/**
- src/aiida/storage/psql_dos/migrator.py
- aiida/storage/psql_dos/migrations/**
- tests/storage/psql_dos/migrations/**
- tests/storage/psql_dos/test_nodes.py
workflow_dispatch:
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
jobs:
nightly-tests:
if: github.repository == 'aiidateam/aiida-core' # Prevent running the builds on forks as well
runs-on: ubuntu-24.04
services:
postgres:
image: postgres:12
env:
POSTGRES_DB: test_aiida
POSTGRES_PASSWORD: ''
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
rabbitmq:
image: rabbitmq:3.8.14-management
ports:
- 5672:5672
- 15672:15672
slurm:
image: xenonmiddleware/slurm:17
ports:
- 5001:22
steps:
- uses: actions/checkout@v6
- name: Install system dependencies
run: sudo apt update && sudo apt install postgresql
- name: Install aiida-core
id: install
uses: ./.github/actions/install-aiida-core
with:
python-version: '3.11'
from-lock: 'true'
- name: Setup environment
run: .github/workflows/setup.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.
# Don't run on PRs, the failure is clearly visible in GitHub UI.
# Run only when the `secrets.SLACK_WEBHOOK` is available, which is not the case for forks.
if: >-
always() &&
(steps.install.outcome == 'failure' ||
steps.pytest-tests.outcome == 'failure' ||
steps.daemon-tests.outcome == 'failure') &&
github.event_name != 'pull_request' &&
env.SLACK_WEBHOOK != null
uses: ./.github/actions/slack-notification
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
with:
title: Nightly build of `aiida-core/main` failed
message: The tests of the `nightly.yml` GHA worklow failed.
# Run a subset of test suite to ensure compatibility with latest RabbitMQ releases
rabbitmq-tests:
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
# Currently supported RMQ versions per:
# https://www.rabbitmq.com/docs/which-erlang#compatibility-matrix
rabbitmq-version: ['3.11', '3.12', '3.13', '4.0']
services:
rabbitmq:
image: rabbitmq:${{ matrix.rabbitmq-version }}-management
ports:
- 5672:5672
- 15672:15672
steps:
- uses: actions/checkout@v6
- name: Install aiida-core
id: install
uses: ./.github/actions/install-aiida-core
with:
python-version: '3.11'
from-lock: 'true'
- name: Setup SSH on localhost
run: .github/workflows/setup_ssh.sh
- name: Suppress RabbitMQ version warning
run: verdi config set warnings.rabbitmq_version False
- name: Run tests
id: tests
env:
AIIDA_WARN_v3: 0
run: pytest -s --db-backend sqlite -m 'requires_rmq' tests/
- 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.
# Don't run on PRs, the failure is clearly visible in GitHub UI.
# Run only when the `secrets.SLACK_WEBHOOK` is available, which is not the case for forks.
if: >-
always() &&
(steps.install.outcome == 'failure' || steps.tests.outcome == 'failure') &&
github.event_name != 'pull_request' &&
env.SLACK_WEBHOOK != null
uses: ./.github/actions/slack-notification
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
with:
title: RabbitMQ nightly tests of `aiida-core/main` failed
message: RabbitMQ (${{ matrix.rabbitmq-version }}) tests in the `nightly.yml` GHA worklow failed.
⚔