-
Notifications
You must be signed in to change notification settings - Fork 6
59 lines (46 loc) · 1.29 KB
/
tests.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
---
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-1.4.1-0
- uses: snok/install-poetry@v1
with:
version: 1.4.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: py-${{ matrix.python-version }}-deps-${{ hashFiles('**/poetry.lock') }}
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
- run: poetry install --no-interaction
- name: "Linting"
run: "make lint-check"
- name: "Build package & docs"
run: "make build"
- name: "Run tests"
run: "make test"
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2