generated from JGCRI/pytemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 954 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:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
tests:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: anaconda-client-env
environment-file: etc/environment.yml
python-version: 3.9
condarc-file: etc/condarc.yml
auto-activate-base: false
- run: |
conda info
conda list
- name: Test with pytest
run: |
python -m pip install --upgrade pip
pip install .
pip install .[test]
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.xml
fail_ci_if_error: true