-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (41 loc) · 1.08 KB
/
lint.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
name: Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
Analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [3.9, '3.10', '3.11']
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}
- name: Set up Poetry
uses: Gr1N/setup-poetry@v8
- name: Cache Poetry
id: cache-poetry
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-lint-${{ matrix.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Poetry Dependencies
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
poetry install --with dev
- name: Run Pyright
run: |
poetry run pyright bot
- name: Run Ruff
run: |
poetry run ruff bot