-
-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (59 loc) · 1.91 KB
/
coverage_and_lint.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Type Coverage and Linting
on:
push:
branches:
- main
pull_request:
branches:
- main
types: [opened, reopened, synchronize]
jobs:
check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.x"]
name: "Type Coverage and Linting @ ${{ matrix.python-version }}"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Load cached poetry installation @ ${{ matrix.python-version }}"
id: cached-poetry
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-0
- name: "Setup Poetry @ ${{ matrix.python-version }}"
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
- name: "Setup Python @ ${{ matrix.python-version }}"
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
cache: "poetry"
- name: "Install Python deps @ ${{ matrix.python-version }}"
if: ${{ steps.setup-python.outputs.cache-hit != 'true' }}
id: install-deps
run: |
poetry install --without=dev --no-interaction
- name: Activate venv @ ${{ matrix.python-version }}
run: |
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
- name: "Run Pyright @ ${{ matrix.python-version }}"
uses: jakebailey/pyright-action@v2
with:
warnings: false
verify-types: "hondana"
ignore-external: true
annotate: ${{ matrix.python-version != '3.x' && 'all' || 'none' }}
- name: Lint
if: ${{ always() && steps.install-deps.outcome == 'success' }}
uses: chartboost/ruff-action@v1