Skip to content

Commit 259c135

Browse files
committed
🎨🧪 Wire linters into the main CI workflow
This patch makes the quality workflow definition into reusable. It doesn't need to track the same triggers and conditions as the main one. Additionally, the `alls-green` check can now take into account the outcome of linting making it possible to only have one job in the branch protection.
1 parent 7a32450 commit 259c135

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

‎.github/workflows/quality.yml ‎.github/workflows/reusable-quality.yml

+1-10
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44
name: "Quality"
55

66
on:
7-
push:
8-
branches:
9-
- master
10-
- nedbat/*
11-
pull_request:
12-
workflow_dispatch:
7+
workflow_call:
138

149
defaults:
1510
run:
@@ -21,10 +16,6 @@ env:
2116
permissions:
2217
contents: read
2318

24-
concurrency:
25-
group: "${{ github.workflow }}-${{ github.ref }}"
26-
cancel-in-progress: true
27-
2819
jobs:
2920
lint:
3021
name: "Pylint etc"

‎.github/workflows/testsuite.yml

+7
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ concurrency:
2828
cancel-in-progress: true
2929

3030
jobs:
31+
linters:
32+
name: Quality
33+
# Don't run linters if the branch name includes "-notests"
34+
if: "!contains(github.ref, '-notests')"
35+
uses: ./.github/workflows/reusable-quality.yml
36+
3137
tests:
3238
name: "${{ matrix.python-version }} on ${{ matrix.os }}"
3339
runs-on: "${{ matrix.os }}-latest"
@@ -94,6 +100,7 @@ jobs:
94100
# The tests didn't run if the branch name includes "-notests"
95101
if: "!contains(github.ref, '-notests')"
96102
needs:
103+
- linters
97104
- tests
98105
runs-on: ubuntu-latest
99106
steps:

0 commit comments

Comments
 (0)