diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 0fe70299b0..03fffaa269 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -21,7 +21,7 @@ concurrency: jobs: - tests: + nightly-tests: if: github.repository == 'aiidateam/aiida-core' # Prevent running the builds on forks as well runs-on: ubuntu-latest @@ -76,9 +76,9 @@ jobs: run: .github/workflows/tests_nightly.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 + # 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 uses: rtCamp/action-slack-notify@v2 env: @@ -88,3 +88,63 @@ jobs: SLACK_COLOR: b60205 SLACK_TITLE: Nightly build of `aiida-core/main` failed SLACK_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-latest + timeout-minutes: 30 + + 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'] + + services: + postgres: + image: postgres:16 + 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:${{ matrix.rabbitmq-version }}-management + ports: + - 5672:5672 + - 15672:15672 + + steps: + - uses: actions/checkout@v4 + + - name: Install aiida-core + uses: ./.github/actions/install-aiida-core + + - name: Install system dependencies + run: sudo apt update && sudo apt install postgresql + + - name: Run tests + run: pytest -sv -k 'requires_rmq' + + - 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 + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_ICON: https://www.materialscloud.org/discover/images/0ba0a17d.aiida-logo-128.png + SLACK_CHANNEL: dev-aiida-core + SLACK_COLOR: b60205 + SLACK_TITLE: RabbitMQ nightly tests of `aiida-core/main` failed + SLACK_MESSAGE: The rabbitmq tests in the `nightly.yml` GHA worklow failed. diff --git a/.github/workflows/rabbitmq.yml b/.github/workflows/rabbitmq.yml deleted file mode 100644 index 231cf9440e..0000000000 --- a/.github/workflows/rabbitmq.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: rabbitmq - -on: - push: - branches-ignore: [gh-pages] - pull_request: - branches-ignore: [gh-pages] - paths-ignore: [docs/**] - -# 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 - -jobs: - - tests: - - runs-on: ubuntu-latest - timeout-minutes: 30 - - strategy: - fail-fast: false - matrix: - rabbitmq-version: ['3.6', '3.7', '3.8'] - - services: - postgres: - image: postgres:10 - 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:${{ matrix.rabbitmq-version }}-management - ports: - - 5672:5672 - - 15672:15672 - - steps: - - uses: actions/checkout@v4 - - - name: Install aiida-core - uses: ./.github/actions/install-aiida-core - - - name: Install system dependencies - run: sudo apt update && sudo apt install postgresql - - - name: Run tests - run: pytest -sv -k 'requires_rmq'