-
Notifications
You must be signed in to change notification settings - Fork 32
66 lines (53 loc) · 1.57 KB
/
test_lint.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
name: Test and lint
on:
push:
pull_request:
branches: [ devel ]
schedule:
- cron: '0 2 * * 6'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# Keep in sync with the Python Trove classifiers in pyproject.toml.
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
name: Test with Python (${{ matrix.python_version }})
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
allow-prereleases: true
- name: Install package
run: python -m pip install .[test]
- name: Run tests
run: python3 -m pytest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install linters
run: python3 -m pip install pylint pylint-exit pycodestyle
- name: Lint with pylint
run: |
pylint --rcfile=".github/pylintrc" dkb_robo/ || pylint-exit $?
- name: Lint with pycodestyle
run: |
pycodestyle --max-line-length=380 dkb_robo/.