-
Notifications
You must be signed in to change notification settings - Fork 99
41 lines (36 loc) · 1.23 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
36
37
38
39
40
41
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@v4
- name: Setup Python ${{ env.python-version }} Environment
uses: ./.github/actions/setup-python-env
with:
python-version: "${{ env.python-version }}"
hatch-environment-cache-config-json: >-
{
"configs": [
{"hatch_project_directory": ".", "hatch_environment_name": "dev-env"}
]
}
cache-pre-commit-environment: true
- name: Run Linter
run: >
hatch -v run dev-env:pre-commit run --verbose --show-diff-on-failure --color=always --all-files