Skip to content

Commit 1f13345

Browse files
committed
refactor: make CI do less unneeded steps
1 parent 227e712 commit 1f13345

13 files changed

+99
-83
lines changed

.github/actions/install-dependencies/action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
node-version:
55
description: the version of Node.js to install
66
default: 20.19.1
7+
pnpm-filters:
8+
description: space-separated list of pnpm filters to apply (e.g., "wrangler miniflare")
9+
default: ""
710
turbo-api:
811
description: the api URL for connecting to the turbo remote cache
912
turbo-team:
@@ -40,7 +43,14 @@ runs:
4043
4144
- name: Install NPM Dependencies
4245
shell: bash
43-
run: pnpm install --frozen-lockfile
46+
run: |
47+
FILTERS=""
48+
if [ -n "${{ inputs.pnpm-filters }}" ]; then
49+
for filter in ${{ inputs.pnpm-filters }}; do
50+
FILTERS="$FILTERS --filter $filter"
51+
done
52+
fi
53+
pnpm install --frozen-lockfile $FILTERS
4454
4555
- name: Install uv for Python
4656
uses: astral-sh/setup-uv@v6

.github/workflows/auto-assign-issues.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,10 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
1818

19-
- name: Setup Node.js
20-
uses: actions/setup-node@v4
19+
- uses: ./.github/actions/install-dependencies
2120
with:
2221
node-version: 22 # need this version for `Set` methods
23-
24-
- name: Install pnpm
25-
uses: pnpm/action-setup@v4
26-
with:
27-
version: 9.12.0
28-
29-
- name: Install Dependencies
30-
run: pnpm i -F tools --frozen-lockfile
22+
pnpm-filters: "tools"
3123

3224
- name: Auto-assign issue
3325
run: node -r esbuild-register tools/github-workflow-helpers/auto-assign-issues.ts

.github/workflows/c3-dependabot-versioning-prs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ jobs:
2121
fetch-depth: 2
2222
ref: ${{ github.head_ref }}
2323
token: ${{ secrets.GH_ACCESS_TOKEN }}
24+
2425
- name: Install Dependencies
2526
uses: ./.github/actions/install-dependencies
27+
wirh:
28+
pnpm-filters: "tools"
29+
2630
- name: Configure Git
2731
run: |
2832
git config --global user.email [email protected]

.github/workflows/e2e-project-cleanup.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424

2525
- name: Install Dependencies
2626
uses: ./.github/actions/install-dependencies
27+
with:
28+
pnpm-filters: "tools"
2729

2830
- name: Cleanup E2E test projects
2931
run: node -r esbuild-register tools/e2e/e2eCleanup.ts

.github/workflows/miniflare-dependabot-versioning-prs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525

2626
- name: Install Dependencies
2727
uses: ./.github/actions/install-dependencies
28+
with:
29+
pnpm-filters: "tools"
2830

2931
- name: Configure Git
3032
run: |

.github/workflows/open-v3-maintenance-prs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333

3434
- name: Install Dependencies
3535
uses: ./.github/actions/install-dependencies
36+
with:
37+
pnpm-filters: "tools"
3638

3739
- uses: Ana06/[email protected]
3840
id: files

.github/workflows/prerelease.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- name: Install Dependencies
3131
uses: ./.github/actions/install-dependencies
3232
with:
33+
pnpm-filters: "packages/* !packages/vite-plugin-cloudflare/playground/*"
3334
turbo-api: ${{ secrets.TURBO_API }}
3435
turbo-team: ${{ secrets.TURBO_TEAM }}
3536
turbo-token: ${{ secrets.TURBO_TOKEN }}
@@ -39,7 +40,7 @@ jobs:
3940
- run: echo ${{ github.head_ref }}
4041

4142
- name: Build
42-
run: pnpm build --filter="./packages/*"
43+
run: pnpm build --filter="./packages/*" --filters="!./packages/vite-plugin-cloudflare/playground/*"
4344
env:
4445
NODE_ENV: "production"
4546
CI_OS: ${{ runner.os }}

.github/workflows/validate-pr-description.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ permissions:
1818
contents: read
1919

2020
jobs:
21-
check:
21+
detect-changes:
2222
# Don't check the Version Packages PR
2323
if: github.head_ref != 'changeset-release/main'
24-
concurrency:
25-
group: ${{ github.workflow }}-${{ github.ref }}-add-pr
26-
cancel-in-progress: true
27-
timeout-minutes: 30
28-
name: Check
24+
timeout-minutes: 5
25+
name: Detect Changes
2926
runs-on: ubuntu-slim
27+
outputs:
28+
non_markdown_changed: ${{ steps.changes.outputs.everything_but_markdown }}
3029
steps:
3130
- name: Checkout Repo
3231
uses: actions/checkout@v4
@@ -40,22 +39,31 @@ jobs:
4039
everything_but_markdown:
4140
- '!**/*.md'
4241
43-
- uses: Ana06/[email protected]
44-
id: files
42+
validate:
43+
name: Validate PR Description
44+
needs: detect-changes
45+
if: needs.detect-changes.outputs.non_markdown_changed == 'true'
46+
concurrency:
47+
group: ${{ github.workflow }}-${{ github.ref }}-validate
48+
cancel-in-progress: true
49+
timeout-minutes: 30
50+
runs-on: ubuntu-slim
51+
steps:
52+
- name: Checkout Repo
53+
uses: actions/checkout@v4
4554
with:
46-
format: "json"
55+
fetch-depth: 1
4756

4857
- name: Install Dependencies
49-
if: steps.changes.outputs.everything_but_markdown == 'true'
5058
uses: ./.github/actions/install-dependencies
5159
with:
60+
pnpm-filters: "tools"
5261
turbo-api: ${{ secrets.TURBO_API }}
5362
turbo-team: ${{ secrets.TURBO_TEAM }}
5463
turbo-token: ${{ secrets.TURBO_TOKEN }}
5564
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
5665

5766
- run: node -r esbuild-register tools/deployments/validate-pr-description.ts
58-
if: steps.changes.outputs.everything_but_markdown == 'true'
5967
env:
6068
TITLE: ${{ github.event.pull_request.title }}
6169
BODY: ${{ github.event.pull_request.body }}

.github/workflows/workers-shared-deploy-production.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
steps:
1414
- name: Checkout repo
1515
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 1
1618

1719
- name: Install Dependencies
1820
uses: ./.github/actions/install-dependencies

.github/workflows/workers-shared-deploy-staging.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
steps:
1818
- name: "Checkout repo"
1919
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 1
2022

2123
- name: Install Dependencies
2224
uses: ./.github/actions/install-dependencies

0 commit comments

Comments
 (0)