-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.7 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
56
57
58
59
60
61
name: CI
on:
push:
branches: [master]
pull_request: ~
env:
FORCE_COLOR: 1
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- uses: actions/cache@v4
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Parse .tool-versions
uses: paulo-ferraz-oliveira/parse-tool-versions@v1
id: tool-versions
- uses: actions/setup-python@v5
with:
python-version: ${{ steps.tool-versions.outputs.python }}
- name: Install poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ steps.tool-versions.outputs.poetry }}
- name: Install pip dependencies
run: poetry install
- uses: pre-commit/[email protected]
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.12', '3.11', '3.10']
steps:
- uses: actions/checkout@master
- uses: actions/cache@v4
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Parse .tool-versions
uses: paulo-ferraz-oliveira/parse-tool-versions@v1
id: tool-versions
- uses: actions/setup-python@v5
with:
python-version: '${{ matrix.python-version }}'
- name: Install poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ steps.tool-versions.outputs.poetry }}
- name: Install pip dependencies
run: poetry install
- name: Run tests
run: poetry run pytest