-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (57 loc) · 1.77 KB
/
test-conda.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
# Derived from https://github.com/marketplace/actions/setup-miniconda
on: [push, pull_request]
jobs:
test-conda:
name: conda (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.11']
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v1
env:
# Increase this value to reset cache if
# etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
# ~/conda_pkgs_dir set via miniconda action
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
# This is the main miniconda rule
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
# A few rules to tell us th ebasic static
- name: Conda info
# This `bash -l {0}` is somehow needed to activate conda...
shell: bash -l {0}
run: conda info
- name: status
shell: bash -l {0}
if: ${{ runner.os != 'Windows' }}
run: |
set -x
ls ~/
which conda
which python
which pip
which pwsh || true
pwd
ls
true
# Actually install the environment
- name: Install environment.yml
shell: bash -l {0}
run: conda env update --verbose -f environment.yml
# Test
- name: Test packages
shell: bash -l {0}
run: |
conda activate coderefinery
bash test.sh