-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (50 loc) · 1.5 KB
/
ci.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
---
name: ci
on: [push] # yamllint disable-line rule:truthy
jobs:
code-analysis:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toxenv:
- 'flake8'
- 'mypy'
- 'bandit'
- 'pip-audit'
experimental: [false]
container: python:3.12
steps:
- uses: actions/checkout@v4
- run: apt-get update && apt-get install -y python3 python3-pip
- run: pip install --upgrade tox
- run: tox -e ${{ matrix.toxenv }} || ${{ matrix.experimental }}
yamllint:
runs-on: ubuntu-latest
container: python:3.12
steps:
- uses: actions/checkout@v4
- run: pip install yamllint
- run: yamllint --format standard .
pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python:
- {'toxenv': 'py38', 'container': 'python:3.8'}
- {'toxenv': 'py39', 'container': 'python:3.9'}
- {'toxenv': 'py310', 'container': 'python:3.10'}
- {'toxenv': 'py311', 'container': 'python:3.11'}
- {'toxenv': 'py312', 'container': 'python:3.12'}
experimental: [false]
container:
image: ${{ matrix.python.container}}
steps:
- uses: actions/checkout@v4
- run: pip install --upgrade tox
- run: tox -e ${{ matrix.python.toxenv }} || ${{ matrix.experimental }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}