-
Notifications
You must be signed in to change notification settings - Fork 16
62 lines (60 loc) · 2.1 KB
/
test-post-cleanup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Test post cleanup
on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:
jobs:
test-post-cleanup:
name: ${{ matrix.post-cleanup }}
strategy:
matrix:
include:
- post-cleanup: 'none'
mamba-init-block-exists: ''
env-exists: ''
root-exists: ''
binary-exists: ''
- post-cleanup: 'shell-init'
mamba-init-block-exists: '! '
env-exists: ''
root-exists: ''
binary-exists: ''
- post-cleanup: 'environment'
mamba-init-block-exists: '! '
env-exists: '! '
root-exists: ''
binary-exists: ''
- post-cleanup: 'all'
mamba-init-block-exists: '! '
env-exists: '! '
root-exists: '! '
binary-exists: '! '
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# This is a fork of webiny/action-post-run. If webiny/action-post-run is updated, this should be updated as well.
- uses: lisanna-dettwyler/action-post-run@d053b9b43d788b87a409f6cdb3b6fc87c6c8a4fe
with:
run: |
set -euxo pipefail
${{ matrix.mamba-init-block-exists }}grep -F "mamba initialize" ~/.bash_profile
${{ matrix.mamba-init-block-exists }}grep -F "mamba initialize" ~/.bashrc
${{ matrix.env-exists }}test -d ~/micromamba/envs/env-name
${{ matrix.root-exists }}test -d ~/micromamba
${{ matrix.binary-exists }}test -f ~/micromamba-bin/micromamba
${{ matrix.binary-exists }}test -f ~/micromamba-bin/.condarc
- uses: ./
with:
environment-file: 'test/environment.yml'
init-shell: bash
post-cleanup: ${{ matrix.post-cleanup }}
- run: |
set -euxo pipefail
grep -F "mamba initialize" ~/.bash_profile
grep -F "mamba initialize" ~/.bashrc
test -d ~/micromamba/envs/env-name
test -d ~/micromamba
test -f ~/micromamba-bin/micromamba
test -f ~/micromamba-bin/.condarc