-
Notifications
You must be signed in to change notification settings - Fork 16
55 lines (46 loc) · 1.21 KB
/
unit-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
name: Run unit tests
on:
# pull_request:
push:
workflow_dispatch:
schedule:
# Run every Sunday at 03:53 UTC
- cron: 53 3 * * 0
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v2
- name: Cache conda packages and test files
uses: actions/cache@v4
env:
# Increase this value to reset cache
CACHE_NUMBER: 0
with:
path: |
~/conda_pkgs_dir
~/dragons_tests
key: ${{ runner.os }}-${{ env.CACHE_NUMBER }}
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge
python-version: ${{ matrix.python-version }}
- name: Conda info
shell: bash -l {0}
run: |
conda info
conda list
- name: Install packages
shell: bash -l {0}
run: python -m pip install tox tox-conda
- name: Setup DRAGONS_TEST
shell: bash -l {0}
run: echo "DRAGONS_TEST=~/dragons_tests" >> $GITHUB_ENV
- name: Run Tox
shell: bash -l {0}
run: |
tox -r -e py310-unit -v