Skip to content

Commit

Permalink
Devops: Fix Slack notification for nightly tests (#6437)
Browse files Browse the repository at this point in the history
The sentinel word for failure changed in capitalization.
  • Loading branch information
danielhollas authored Jun 4, 2024
1 parent 3404c01 commit 082589f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
strategy:
matrix:
target: [aiida-core-base, aiida-core-with-services, aiida-core-dev]
fail-fast: false
with:
runsOn: ubuntu-22.04
images: ${{ needs.build-amd64.outputs.images }}
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ jobs:
if: github.repository == 'aiidateam/aiida-core' # Prevent running the builds on forks as well
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.10']

services:
postgres:
image: postgres:12
Expand Down Expand Up @@ -64,9 +60,10 @@ jobs:
run: sudo apt update && sudo apt install postgresql

- name: Install aiida-core
id: install
uses: ./.github/actions/install-aiida-core
with:
python-version: ${{ matrix.python-version }}
python-version: '3.11'

- name: Setup environment
run: .github/workflows/setup.sh
Expand All @@ -79,7 +76,7 @@ jobs:
# 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.tests.outcome == 'failure') && env.SLACK_WEBHOOK != null
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
Expand All @@ -91,7 +88,7 @@ jobs:


# Run a subset of test suite to ensure compatibility with latest RabbitMQ releases
rabbitmq_tests:
rabbitmq-tests:

runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down Expand Up @@ -127,19 +124,25 @@ jobs:
- uses: actions/checkout@v4

- name: Install aiida-core
id: install
uses: ./.github/actions/install-aiida-core
with:
python-version: '3.11'

- name: Install system dependencies
run: sudo apt update && sudo apt install postgresql

- name: Run tests
run: pytest -sv -k 'requires_rmq'
id: tests
env:
AIIDA_WARN_v3: 0
run: pytest -sv -m '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
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 }}
Expand Down

0 comments on commit 082589f

Please sign in to comment.