-
Notifications
You must be signed in to change notification settings - Fork 7
52 lines (50 loc) · 1.43 KB
/
ci.yaml
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
name: CI
on: # yamllint disable-line rule:truthy
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python_version: ["3.9", "3.10"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup nox
uses: daisylb/[email protected]
- name: Setup poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: "1.5.1"
- name: Install dependencies
run: |
poetry export -f requirements.txt --extras "docs" --without-hashes --with dev --output requirements.txt
pip install -r requirements.txt
- name: Run tests
run: nox -s test-${{ matrix.python_version }}
- name: Generate coverage XML
run: nox -s generate_coverage_xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
lint:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup nox
uses: daisylb/[email protected]
- name: Setup poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: "1.4.1"
- name: Install dependencies
run: |
poetry export -f requirements.txt --extras "docs" --without-hashes --with dev --output requirements.txt
pip install -r requirements.txt
- name: Run lint
run: nox -s lint