-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.58 KB
/
checks.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
name: Checks
on:
pull_request:
branches:
- main
push:
branches:
- main
- test-ci**
workflow_dispatch: # Enable workflow to be run manually
# Disable all access to the GitHub API by default
# This default can be overridden for individual workflows and jobs
# Documentation: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#permissions
permissions: {}
# Cancel the currently running CI job if you push a change while CI is running
# Documentation: https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
checks:
runs-on: ubuntu-22.04 # Pinned version of `ubuntu-latest`
name: Run checks
env:
PYTHON_VERSION: 3.11.10
defaults:
run:
shell: bash -leo pipefail {0}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Initialize Python environment
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: pip
cache-dependency-path: requirements-lock.txt
- name: Install dependencies into Python environment
run: |
make update
- name: Cache pre-commit environments
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: precommit--${{ runner.os }}--${{ runner.arch }}--${{ env.PYTHON_VERSION }}--${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run all checks
run: |
SKIP=no-commit-to-branch make check