-
Notifications
You must be signed in to change notification settings - Fork 96
35 lines (30 loc) · 1.04 KB
/
ci-linting.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
name: Pre-Merge Linting
on:
workflow_dispatch:
# run these jobs against the PR + master. To run tests against just the PR, use "push" instead of "pull_request"
pull_request:
# run these jobs when a PR is opened, edited, reopened, or updated (synchronize)
# edited = title, body, or the base branch of the PR is modified
# synchronize = commit(s) pushed to the pull request
types:
- opened
- edited
- reopened
- synchronize
jobs:
pre-commit:
name: Run Pre-Commit Linting Hooks
runs-on: ubuntu-latest
env:
python-version: "3.8"
steps:
- name: Check-out the repo
uses: actions/checkout@v3
- name: Setup Python ${{ env.python-version }} Environment
uses: ./.github/actions/setup-python-env
with:
python-version: "${{ env.python-version }}"
- name: Run Linter
run: >
hatch -v run dev-env:pre-commit run --show-diff-on-failure --color=always --all-files
|| (cat /home/runner/.cache/pre-commit/pre-commit.log && false)