-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (38 loc) · 1.03 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
name: CI
on:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
run_lints:
name: Run linters
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Python setup
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install poetry
run: |
python -m pip install -U poetry
- id: cache-poetry
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
poetry install
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre_commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Pre-commit linters
run: |
poetry run pre-commit run --show-diff-on-failure --color=always --all-files