-
Notifications
You must be signed in to change notification settings - Fork 5
74 lines (62 loc) · 1.68 KB
/
run-tests.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
name: Tests
on:
push:
branches:
- main
pull_request:
jobs:
full-tests:
name: Run the PyTest tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install environment
uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.29.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
environments: test
activate-environment: true
- name: Install Node dependencies
run: |
npm ci
- name: Cache model data
uses: actions/cache@v4
with:
path: .dvc/cache
key: test-dvc-cache-${{ hashFiles('models/**.dvc') }}
- name: Fetch model data
run: |
dvc pull -R models tests
env:
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
- name: Run tests
run: |
python -m pytest -v
nodata-tests:
name: Run the PyTest tests without model data
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install environment
uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.29.0
cache: true
# just reuse cache from previous run of other test action
cache-write: false
environments: test
activate-environment: true
- name: Run tests
run: |
python -m pytest -v
env:
POPROX_CI_WITHOUT_DATA: 1