-
Notifications
You must be signed in to change notification settings - Fork 24
44 lines (38 loc) · 1.11 KB
/
build-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
44
name: tests
on:
push:
branches-ignore:
- 'v*'
pull_request:
jobs:
build:
if: github.repository == 'SCECcode/pycsep'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: true
environment-file: requirements.yml
create-args: >-
python=${{ matrix.python-version }}
- name: Install pyCSEP
run: |
pip install --no-deps -e .
python -c "import csep; print('Version: ', csep.__version__)"
- name: Test with pytest
run: |
pip install vcrpy==4.3.1 pytest pytest-cov
pytest --cov=./ --cov-config=.coveragerc
- name: Upload coverage
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
run: |
bash <(curl -s https://codecov.io/bash) || echo 'Codecov failed to upload'