Skip to content

Commit 7bb9f7d

Browse files
committed
ci: stop running webapp and internal tests for changes to packages they don't depend on
The webapp and internal path filters matched packages/** wholesale, so a change under packages/cli-v3 ran the 24-shard webapp unit suite, the webapp e2e suite, the runops and FK guards, and the internal suite. The webapp and internal packages depend on core, trigger-sdk, redis-worker, plugins, schema-to-json and build only, so changes to cli-v3, react-hooks, python and rsc now run just their own suites (packages, e2e, sdk-compat).
1 parent f347f0e commit 7bb9f7d

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

‎.github/workflows/pr_checks.yml‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
outputs:
2121
code: ${{ steps.code_filter.outputs.code }}
2222
typecheck_self: ${{ steps.filter.outputs.typecheck_self }}
23-
webapp: ${{ steps.filter.outputs.webapp }}
23+
webapp: ${{ steps.filter.outputs.webapp == 'true' || steps.shared_packages_filter.outputs.shared_packages == 'true' }}
2424
packages: ${{ steps.filter.outputs.packages }}
25-
internal: ${{ steps.filter.outputs.internal }}
25+
internal: ${{ steps.filter.outputs.internal == 'true' || steps.shared_packages_filter.outputs.shared_packages == 'true' }}
2626
obsmap: ${{ steps.filter.outputs.obsmap }}
2727
cli: ${{ steps.filter.outputs.cli }}
2828
sdk: ${{ steps.filter.outputs.sdk }}
@@ -62,7 +62,6 @@ jobs:
6262
- '.github/workflows/code-quality.yml'
6363
webapp:
6464
- 'apps/webapp/**'
65-
- 'packages/**'
6665
- 'internal-packages/**'
6766
- '.github/workflows/pr_checks.yml'
6867
- '.github/workflows/unit-tests-webapp.yml'
@@ -85,7 +84,6 @@ jobs:
8584
- 'turbo.json'
8685
internal:
8786
- 'internal-packages/**'
88-
- 'packages/**'
8987
- '.github/workflows/pr_checks.yml'
9088
- '.github/workflows/unit-tests-internal.yml'
9189
- '.configs/**'
@@ -111,7 +109,7 @@ jobs:
111109
#
112110
# Deliberately NOT here: this package's own paths, and packages/plugins/src and
113111
# internal-packages/rbac/src, the other two trees webappSymbols.test.ts reads.
114-
# `internal` above already matches `internal-packages/**` and `packages/**`, and
112+
# `internal` above already matches `internal-packages/**` and the shared packages, and
115113
# `unit-tests-internal.yml` runs `turbo run test --filter "@internal/*"`, which picks up
116114
# @internal/observability-map and runs the same vitest suite. Listing them here as well
117115
# ran the suite twice on every PR touching them, which was this filter's own doing.
@@ -148,6 +146,19 @@ jobs:
148146
- 'pnpm-workspace.yaml'
149147
- 'turbo.json'
150148
149+
# Only the packages the webapp and internal packages depend on; the rest run their own suites.
150+
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
151+
id: shared_packages_filter
152+
with:
153+
predicate-quantifier: every
154+
filters: |
155+
shared_packages:
156+
- 'packages/**'
157+
- '!packages/cli-v3/**'
158+
- '!packages/react-hooks/**'
159+
- '!packages/python/**'
160+
- '!packages/rsc/**'
161+
151162
code-quality:
152163
uses: ./.github/workflows/code-quality.yml
153164

0 commit comments

Comments
 (0)