@@ -82,18 +82,23 @@ jobs:
8282 run : .github/workflows/daemon_tests.sh
8383
8484 - name : Slack notification
85- # Always run this step (otherwise it would be skipped if any of the previous steps fail) but only if the
86- # `install` or `tests` steps failed, and the `SLACK_WEBHOOK` is available. The latter is not the case for
87- # pull requests that come from forks. This is a limitation of secrets on GHA
88- if : always() && (steps.install.outcome == 'failure' || steps.pytest-tests.outcome == 'failure' || steps.daemon-tests.outcome == 'failure') && env.SLACK_WEBHOOK != null
89- uses : rtCamp/action-slack-notify@v2
85+ # Always run this step (otherwise it would be skipped if any of the previous steps fail)
86+ # but only if the `install` or `tests` steps failed.
87+ # Don't run on PRs, the failure is clearly visible in GitHub UI.
88+ # Run only when the `secrets.SLACK_WEBHOOK` is available, which is not the case for forks.
89+ if : >-
90+ always() &&
91+ (steps.install.outcome == 'failure' ||
92+ steps.pytest-tests.outcome == 'failure' ||
93+ steps.daemon-tests.outcome == 'failure') &&
94+ github.event_name != 'pull_request' &&
95+ env.SLACK_WEBHOOK != null
96+ uses : ./.github/actions/slack-notification
9097 env :
9198 SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
92- SLACK_ICON : https://www.materialscloud.org/discover/images/0ba0a17d.aiida-logo-128.png
93- SLACK_CHANNEL : dev-aiida-core
94- SLACK_COLOR : b60205
95- SLACK_TITLE : Nightly build of `aiida-core/main` failed
96- SLACK_MESSAGE : The tests of the `nightly.yml` GHA worklow failed.
99+ with :
100+ title : Nightly build of `aiida-core/main` failed
101+ message : The tests of the `nightly.yml` GHA worklow failed.
97102
98103
99104 # Run a subset of test suite to ensure compatibility with latest RabbitMQ releases
@@ -139,15 +144,18 @@ jobs:
139144 run : pytest -s --db-backend sqlite -m 'requires_rmq' tests/
140145
141146 - name : Slack notification
142- # Always run this step (otherwise it would be skipped if any of the previous steps fail) but only if the
143- # `install` or `tests` steps failed, and the `SLACK_WEBHOOK` is available. The latter is not the case for
144- # pull requests that come from forks. This is a limitation of secrets on GHA
145- if : always() && (steps.install.outcome == 'failure' || steps.tests.outcome == 'failure') && env.SLACK_WEBHOOK != null
146- uses : rtCamp/action-slack-notify@v2
147+ # Always run this step (otherwise it would be skipped if any of the previous steps fail)
148+ # but only if the `install` or `tests` steps failed.
149+ # Don't run on PRs, the failure is clearly visible in GitHub UI.
150+ # Run only when the `secrets.SLACK_WEBHOOK` is available, which is not the case for forks.
151+ if : >-
152+ always() &&
153+ (steps.install.outcome == 'failure' || steps.tests.outcome == 'failure') &&
154+ github.event_name != 'pull_request' &&
155+ env.SLACK_WEBHOOK != null
156+ uses : ./.github/actions/slack-notification
147157 env :
148158 SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
149- SLACK_ICON : https://www.materialscloud.org/discover/images/0ba0a17d.aiida-logo-128.png
150- SLACK_CHANNEL : dev-aiida-core
151- SLACK_COLOR : b60205
152- SLACK_TITLE : RabbitMQ nightly tests of `aiida-core/main` failed
153- SLACK_MESSAGE : The rabbitmq tests in the `nightly.yml` GHA worklow failed.
159+ with :
160+ title : RabbitMQ nightly tests of `aiida-core/main` failed
161+ message : RabbitMQ (${{ matrix.rabbitmq-version }}) tests in the `nightly.yml` GHA worklow failed.
0 commit comments