-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 996 Bytes
/
test.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
name: Tests
on:
push: {}
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache conda
uses: actions/cache@v4
env:
CACHE_NUMBER: 0 # Increase this value to reset cache if environment.yml has not changed
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
environment-file: environment.yml
- name: Install Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.8.5
- name: Install dependencies
shell: bash -l {0}
run: |
poetry env info
poetry install
pip list
- name: Run tests
shell: bash -l {0}
run: |
poetry run pytest -s