-
Notifications
You must be signed in to change notification settings - Fork 20
108 lines (94 loc) · 4 KB
/
test_deinit.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Test deinit
on:
push:
branches:
- main
pull_request: null
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test_deinit:
name: Test deinit - ${{ matrix.os }} ${{ matrix.rcfile }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# .bash_profile gets initialized in p-w-m ubuntu-latest instead of .bashrc like in micromamba
- { os: ubuntu-latest, rcfile: ~/.bash_profile }
- { os: ubuntu-latest, rcfile: ~/.zshrc }
# TODO zshrc not yet initialized in macos p-w-m
# https://github.com/mamba-org/mamba/issues/925
- { os: macos-latest, rcfile: ~/.bash_profile }
- { os: windows-latest, rcfile: ~/.bash_profile }
- { os: windows-latest, rcfile: ~/Documents/WindowsPowerShell/profile.ps1 }
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:
# assert that mamba initialize is not in rcfile
# if the rcfile is not found, the test will still succeed
run: |
! grep -F "mamba initialize" ${{ matrix.rcfile }}
- uses: ./
with:
environment-file: false
- run: grep -F "mamba initialize" ${{ matrix.rcfile }}
test_deinit_false:
name: Test deinit false - ${{ matrix.os }} ${{ matrix.rcfile }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# .bash_profile gets initialized in p-w-m ubuntu-latest instead of .bashrc like in micromamba
- { os: ubuntu-latest, rcfile: ~/.bash_profile }
- { os: ubuntu-latest, rcfile: ~/.zshrc }
# TODO zshrc not yet initialized in macos p-w-m
# https://github.com/mamba-org/mamba/issues/925
- { os: macos-latest, rcfile: ~/.bash_profile }
- { os: windows-latest, rcfile: ~/.bash_profile }
- { os: windows-latest, rcfile: ~/Documents/WindowsPowerShell/profile.ps1 }
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:
# assert that mamba initialize is in rcfile
run: |
grep -F "mamba initialize" ${{ matrix.rcfile }}
- uses: ./
with:
environment-file: false
post-deinit: false
- run: grep -F "mamba initialize" ${{ matrix.rcfile }}
test_deinit_auto_old_micromamba:
name: Test deinit auto old micromamba - ${{ matrix.os }} ${{ matrix.rcfile }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# .bash_profile gets initialized in p-w-m ubuntu-latest instead of .bashrc like in micromamba
- { os: ubuntu-latest, rcfile: ~/.bash_profile }
- { os: ubuntu-latest, rcfile: ~/.zshrc }
# TODO zshrc not yet initialized in macos p-w-m
# https://github.com/mamba-org/mamba/issues/925
- { os: macos-latest, rcfile: ~/.bash_profile }
- { os: windows-latest, rcfile: ~/.bash_profile }
- { os: windows-latest, rcfile: ~/Documents/WindowsPowerShell/profile.ps1 }
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:
# assert that mamba initialize is in rcfile
run: |
grep -F "mamba initialize" ${{ matrix.rcfile }}
- uses: ./
with:
environment-file: false
micromamba-version: "0.23.0"
- run: grep -F "mamba initialize" ${{ matrix.rcfile }}