-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (75 loc) · 2.23 KB
/
tests-coverage.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
name: Python tests
on:
push:
pull_request:
branches: [master]
jobs:
windows-conda-tests:
runs-on: "windows-latest"
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: true
- name: Run unit tests
shell: powershell
run: |
pip install . --no-deps
pip install -r dev-requirements.txt coverage
pytest --cov niche_vlaanderen --cov-report xml --verbose --tb=long
- name: Upload coverage
run: |
python -m pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
linux-pip-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
fail-fast: [false]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies & run unit tests
run: |
sudo apt-get update
sudo apt-get -y install libgdal-dev gdal-bin pandoc
python -m pip install --upgrade pip
pip install coveralls wheel
ls
pip install -r dev-requirements.txt
pytest --cov niche_vlaanderen --cov --verbose --tb=long
- name: Upload coverage
run: |
python -m pip install coveralls
COVERALLS_PARALLEL=true coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
finish-coverage:
runs-on: ubuntu-latest
needs:
- windows-conda-tests
- linux-pip-tests
steps:
- name: Coveralls finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true