-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (48 loc) · 1.39 KB
/
pull_request_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
name: Pytests
on: pull_request
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.11]
include:
- os: ubuntu-latest
python-version: '3.10'
- os: ubuntu-latest
python-version: 3.9
- os: ubuntu-latest
python-version: 3.8
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
miniconda-version: "latest"
- name: Install conda dependencies
shell: bash -l {0}
run: |
conda install rtree pip pytest
pip install pytest-cov
pip install -e .
pip install HOPP==0.0.5
- name: Run pytest and Generate coverage report
shell: bash -l {0}
run: |
pytest -v --disable-warnings --cov=./ --cov-report=xml:coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
verbose: true