-
Notifications
You must be signed in to change notification settings - Fork 12
63 lines (56 loc) · 1.65 KB
/
pytest.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
name: Python Tests
on:
workflow_run:
workflows: ["Build and Deploy"]
branches: [main]
types:
- completed
pull_request:
branches: main
jobs:
test:
name: ${{ matrix.CONDA_ENV }}-test
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
CONDA_ENV: [unpinned]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache conda environment
uses: actions/cache@v2
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: >
${{ format('{0}-conda-{1}-{2}',
runner.os,
env.CACHE_NUMBER,
hashFiles(format('clients/python/ci/environment-{0}.yml', matrix.CONDA_ENV))) }}
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: false
activate-environment: sliderule-ci
environment-file: clients/python/ci/environment-${{ matrix.CONDA_ENV }}.yml
use-only-tar-bz2: true
- name: Install sliderule from current commit
shell: bash -l {0}
run: |
cd clients/python
python -m pip install .
conda list
- name: Install netrc for authentication
shell: bash -l {0}
run: |
echo "${{ secrets.NETRC }}" > $HOME/.netrc
chmod 600 $HOME/.netrc
- name: Run tests
shell: bash -l {0}
run: |
cd clients/python
python -m pytest --verbose --organization cicd --desired_nodes 3