-
Notifications
You must be signed in to change notification settings - Fork 5
65 lines (52 loc) · 1.53 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
62
63
64
65
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
steps:
- id: checkout
name: "Checkout 🛎"
uses: actions/checkout@v2
- id: setup-python
name: "Setup Python ${{ matrix.python-version }} 🏗"
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- id: setup-poetry
name: "Setup Poetry 📝"
run: |
curl -sSL https://install.python-poetry.org | python3 -
- id: get-cache-poetry-directory
name: "Get poetry's cache directory 🔎"
run: |
echo "::set-output name=dir::$(poetry config cache-dir)"
- id: cache-poetry-directory
name: "Cache poetry 📦"
uses: actions/cache@v3.0.11
with:
path: ${{ steps.get-cache-poetry-directory.outputs.dir }}
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-
- id: install-dependencies
name: "Install dependencies 👨🏻💻"
run: make setup
- id: poetry-lock
name: "Run poetry lock 📌"
run: poetry lock --check
- id: run-test
name: "Run tests 🧪"
run: make test
- id: run-linters
name: Run linters 🚨
run: make lint
- id: run-typing
name: Run mypy 🏷
run: make mypy