-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.38 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
54
55
name: Continuous Integration
on:
push:
branches: [main, master]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
python: ["3.9", "3.10", "3.11", "pypy-3.9"]
platform: ["ubuntu-latest"]
runs-on: ${{ matrix.platform }}
name: "Test: Python ${{ matrix.python }} on ${{ matrix.platform }}"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install Poetry
uses: snok/[email protected]
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-venv
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ matrix.python }}-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-venv.outputs.cache-hit != 'true'
run: make install-deps
- name: Lint
run: make lint
- name: Test
run: make test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}