-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (36 loc) · 997 Bytes
/
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
name: Lint and Auto-Fix Code
on:
push:
pull_request:
branches:
- main
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9' # Specify the Python version you need
- name: Install Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: '1.8.3'
- name: Cache Poetry dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pypoetry
~/.virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: poetry install
- name: Install osipi
run: |
poetry install -E docs
poetry install -E tests
- name: Run pre-commit
run: poetry run pre-commit run --all-files