-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (44 loc) · 1.46 KB
/
Copy pathpython-tests.yml
File metadata and controls
53 lines (44 loc) · 1.46 KB
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
name: Python Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install project dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[test]'
pip install coverage setuptools==80.9.0 coverage-badge
- name: Show environment
run: |
python --version
pip freeze | grep -E 'dask|distributed'
- name: Run tests and collect coverage
run: |
coverage run --source="signifikante" -m unittest discover -s tests -v
NUMBA_DISABLE_JIT=1 coverage run -a --source="signifikante" -m unittest discover -s tests -p 'test_numba.py' -v
# IMPORTANT:
# Do NOT use tj-actions/coverage-badge-py because it force-upgrades setuptools
- name: Generate Coverage Badge
run: |
coverage-badge -f -o coverage.svg
- name: Commit and Push Badge
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "CI: update coverage badge"
file_pattern: coverage.svg