-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (65 loc) · 1.92 KB
/
Copy pathpython-app.yaml
File metadata and controls
79 lines (65 loc) · 1.92 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
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: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
NUMBA_DISABLE_JIT: 1
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- name: Checkout_repository
uses: actions/checkout@v6
- name: Setup_micromamba
uses: mamba-org/setup-micromamba@v3
with:
environment-file: .github/environment.yaml
environment-name: test-environment
init-shell: bash
- name: Install Python ${{ matrix.python-version }}
shell: bash -l {0}
run: |
micromamba install -n test-environment python=${{ matrix.python-version }} -y
- name: Install lint dependencies
shell: bash -l {0}
run: |
python -m pip install flake8
- name: Lint with flake8
shell: bash -l {0}
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings
flake8 . \
--count \
--exit-zero \
--max-complexity=10 \
--max-line-length=127 \
--statistics
- name: Build and test
shell: bash -l {0}
env:
NUMBA_DISABLE_JIT: 1
run: |
python -m pip install build pytest pytest-cov
python -m build
python -m pip install dist/*.whl
pytest \
--cov=pycoxmunk \
pycoxmunk/Tests/ \
--cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
fail_ci_if_error: true
verbose: true