Skip to content

Commit 829e260

Browse files
ci: trip the native lint gate on root package.json changes
Co-authored-by: Codesmith <[email protected]>
1 parent 05fbe87 commit 829e260

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,9 @@ jobs:
175175
paths=$(tr '\t' '\n' <<< "$rows")
176176
177177
# Sources scripts/mobile-native-static-check.ts lints, plus the tool
178-
# and rule configuration that decides how it lints them.
179-
pattern='^apps/mobile/.*\.(swift|kt|kts)$|^apps/mobile/(\.swiftlint\.yml|detekt\.yml|\.editorconfig|Brewfile)$|^scripts/mobile-native-static-check\.ts$|^\.github/workflows/ci\.yml$'
178+
# and rule configuration that decides how it lints them, plus the
179+
# root package.json that defines the lint:mobile command.
180+
pattern='^apps/mobile/.*\.(swift|kt|kts)$|^apps/mobile/(\.swiftlint\.yml|detekt\.yml|\.editorconfig|Brewfile)$|^scripts/mobile-native-static-check\.ts$|^package\.json$|^\.github/workflows/ci\.yml$'
180181
181182
if grep -qE "$pattern" <<< "$paths"; then
182183
echo "Native sources or lint configuration changed:"

‎docs/internals/ci.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
> For maintainers. Using T3 Code? See [docs/user](../user/).
44
5-
[`.github/workflows/ci.yml`](../../.github/workflows/ci.yml) runs four jobs on pull requests and
6-
pushes to `main`:
5+
[`.github/workflows/ci.yml`](../../.github/workflows/ci.yml) runs these quality gates on pull requests
6+
and pushes to `main`:
77

88
- **Check**: `vp check` (format and lint; this repo sets `typeCheck: false` in its lint options),
99
then `vpr typecheck` for the workspace type check. The same job
@@ -13,10 +13,11 @@ pushes to `main`:
1313
- **Mobile Native Static Analysis**: `vp run lint:mobile` on macOS, wrapping
1414
`scripts/mobile-native-static-check.ts`. A cheap Linux **Mobile Native Changes** job gates it:
1515
the macOS runner only boots when the diff touches `apps/mobile` Swift/Kotlin sources, the
16-
SwiftLint/detekt/ktlint configuration, the `Brewfile`, the check script, or `ci.yml`. Otherwise
17-
the job is skipped, which GitHub reports as success for the required check. Renames are matched on
18-
both their old and new path. If the changed-file list cannot be resolved, or GitHub truncates it,
19-
the gate fails open and the lint runs.
16+
SwiftLint/detekt/ktlint configuration, the `Brewfile`, the check script, the root `package.json`
17+
that defines `lint:mobile`, or `ci.yml`. Otherwise the job is skipped, which GitHub reports as
18+
success for the required check. Renames are matched on both their old and new path. If the
19+
changed-file list cannot be resolved, or GitHub truncates it, the gate fails open and the lint
20+
runs.
2021
- **Release Smoke**: exercises release-only workflow steps through `scripts/release-smoke.ts`, so
2122
release breakage surfaces on PRs rather than at tag time.
2223

0 commit comments

Comments
 (0)