Skip to content

Commit 0dcd10a

Browse files
authored
CI: Fix install-with-conda job (#7103)
* CI: Add Slack notification to install-with-conda-job
1 parent 9b69202 commit 0dcd10a

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

.github/workflows/test-install.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,6 @@ jobs:
131131
with:
132132
channels: conda-forge
133133

134-
# Use mamba because conda is running out of memory
135-
# see https://github.com/conda-incubator/setup-miniconda/issues/274
136-
- run: |
137-
conda install -n base conda-libmamba-solver
138-
conda config --set solver libmamba
139-
140-
# Temporary workaround: https://github.com/mamba-org/mamba/issues/488
141-
- run: rm /usr/share/miniconda/pkgs/cache/*.json
142-
143134
- name: Test installation
144135
id: test_installation
145136
continue-on-error: ${{ matrix.optional }}
@@ -153,6 +144,18 @@ jobs:
153144
echo "::warning ::Failed conda installation for
154145
Python ${{ matrix.python-version }}."
155146
147+
- name: Slack notification
148+
if: >-
149+
failure() &&
150+
github.event_name != 'pull_request' &&
151+
env.SLACK_WEBHOOK != null
152+
uses: ./.github/actions/slack-notification
153+
env:
154+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
155+
with:
156+
title: Installation via Conda failed on `aiida-core/main`
157+
message: '`test-install.yml:install-with-conda` GHA workflow for Python ${{ matrix.python-version }} failed.'
158+
156159
tests:
157160

158161
needs: [install-with-pip]
@@ -214,13 +217,11 @@ jobs:
214217
pytest -n auto --db-backend psql -m 'not nightly' tests/
215218
216219
- name: Slack notification
217-
# Always run this step (otherwise it would be skipped if any of the previous steps fail)
218-
# but only if the `install` or `tests` steps failed.
220+
# Run this step if any of the previous steps fail.
219221
# Don't run on PRs, the failure is clearly visible in GitHub UI.
220222
# Run only when the `secrets.SLACK_WEBHOOK` is available, which is not the case for forks.
221223
if: >-
222-
always() &&
223-
(steps.install.outcome == 'failure' || steps.tests.outcome == 'failure') &&
224+
failure() &&
224225
github.event_name != 'pull_request' &&
225226
env.SLACK_WEBHOOK != null
226227
uses: ./.github/actions/slack-notification

0 commit comments

Comments
 (0)