Skip to content

Commit 07803ba

Browse files
authored
Always lint before running tests (#2557)
1 parent d85e52a commit 07803ba

5 files changed

Lines changed: 50 additions & 1 deletion

File tree

.github/workflows/lint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ name: Lint sources
22
run-name: Lint sources
33

44
on:
5-
push:
65
pull_request:
76
branches: [main]
87

8+
concurrency:
9+
group: ci-${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
912
jobs:
1013
lint:
1114
runs-on: ubuntu-latest

.github/workflows/test-client-combos.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,40 @@ on:
1111
types: [opened, synchronize, labeled, unlabeled]
1212
branches: [main]
1313

14+
concurrency:
15+
group: ci-${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
1418
jobs:
19+
lint:
20+
name: Lint sources
21+
if: |
22+
(
23+
contains(join(github.event.pull_request.labels.*.name, ','), 'test-') &&
24+
!contains(github.event.pull_request.labels.*.name, 'test-ethd') &&
25+
!contains(github.event.pull_request.labels.*.name, 'test-grafana') &&
26+
!contains(github.event.pull_request.labels.*.name, 'test-nimbus-proxy') &&
27+
!contains(github.event.pull_request.labels.*.name, 'test-web3signer')
28+
)
29+
|| github.event_name == 'push'
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v6
33+
- name: Set up Docker buildx
34+
uses: docker/setup-buildx-action@v4
35+
- name: Set up Python
36+
uses: actions/setup-python@v6
37+
with:
38+
python-version: 3.14
39+
cache: 'pip'
40+
- name: Lint sources
41+
uses: pre-commit/action@v3.0.1
42+
with:
43+
extra_args: --all-files --show-diff-on-failure
44+
1545
test-client-combo:
1646
runs-on: ubuntu-latest
47+
needs: lint
1748
strategy:
1849
matrix:
1950
combo:

.github/workflows/test-ethd.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ defaults:
66

77
on:
88
push:
9+
branches: [main]
910
pull_request:
1011
types: [opened, synchronize, labeled, unlabeled]
1112
branches: [main]
1213

14+
concurrency:
15+
group: ci-${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
1318
jobs:
1419
test-ethd:
1520
if: |

.github/workflows/test-grafana.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ defaults:
66

77
on:
88
push:
9+
branches: [main]
910
pull_request:
1011
types: [opened, synchronize, labeled, unlabeled]
1112
branches: [main]
1213

14+
concurrency:
15+
group: ci-${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
1318
jobs:
1419
test-grafana:
1520
if: |

.github/workflows/test-nimbus-proxy.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ defaults:
66

77
on:
88
push:
9+
branches: [main]
910
pull_request:
1011
types: [opened, synchronize, labeled, unlabeled]
1112
branches: [main]
1213

14+
concurrency:
15+
group: ci-${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
1318
jobs:
1419
test-nimbus-proxy:
1520
if: |

0 commit comments

Comments
 (0)