-
Notifications
You must be signed in to change notification settings - Fork 70
43 lines (43 loc) · 1.05 KB
/
code-quality.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
name: Code Quality Checks
on:
push:
branches:
- main
- release/**
pull_request:
branches:
- main
- release/**
workflow_call:
workflow_dispatch:
# Cancel old runs when a new commit is pushed to the same branch if not on main or dev
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
defaults:
run:
working-directory: .
jobs:
code-quality:
runs-on: ubuntu-20.04
timeout-minutes: 10
strategy:
matrix:
python_version:
- "3.10"
- "3.11"
pip_deps:
- "[dev]"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Setup
run: |
set -ex
python -m pip install --upgrade 'pip<23' wheel
python -m pip install --upgrade .${{ matrix.pip_deps }}
- name: Run checks
run: |
pre-commit run --all-files