-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 952 Bytes
/
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
name: tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}
jobs:
tests:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- name: Cache conda
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: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
activate-environment: vtc_code
environment-file: environment.yml
python-version: 3.8
auto-activate-base: false
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Run tests
shell: bash -l {0}
run: |
pytest