Skip to content

Commit 987e933

Browse files
ci: Run lint action on all target operating systems (#2360)
Sentry CLI contains platform-dependent code. Therefore, to ensure we catch all linter errors, we need to run `cargo clippy` against all targets.
1 parent 6037c44 commit 987e933

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ env:
1313
RUSTFLAGS: -Dwarnings
1414

1515
jobs:
16-
lint:
17-
name: Lint
18-
runs-on: ubuntu-24.04
16+
lint-each-os:
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-24.04, macos-14, windows-2022]
21+
22+
name: Lint (${{ matrix.os }})
23+
runs-on: ${{ matrix.os }}
1924
steps:
2025
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
2126

@@ -30,6 +35,18 @@ jobs:
3035
- name: Run Clippy
3136
run: cargo clippy --workspace --tests
3237

38+
lint:
39+
needs: lint-each-os
40+
runs-on: ubuntu-24.04
41+
if: always() # Run even if lint-each-os fails
42+
name: Lint
43+
steps:
44+
- name: Check for lint failures
45+
if: contains(needs.lint-each-os.result, 'failure') || contains(needs.lint-each-os.result, 'skipped')
46+
run: |
47+
echo "Required lint check failed. You need to fix the problem before merging."
48+
exit 1
49+
3350
test:
3451
strategy:
3552
fail-fast: false

0 commit comments

Comments
 (0)