diff --git a/.changeset/metal-carrots-battle.md b/.changeset/metal-carrots-battle.md new file mode 100644 index 000000000..95fdb837d --- /dev/null +++ b/.changeset/metal-carrots-battle.md @@ -0,0 +1,4 @@ +--- +--- + +Refactor bundlewatch workflow to use Turbo diff --git a/.github/workflows/bundlewatch.yml b/.github/workflows/bundlewatch.yml index 057f3139b..0cff6f617 100644 --- a/.github/workflows/bundlewatch.yml +++ b/.github/workflows/bundlewatch.yml @@ -19,6 +19,14 @@ jobs: - name: Clone repository uses: actions/checkout@v4 + - name: Cache turbo build setup + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + - name: Set up Node.js uses: actions/setup-node@v4 with: @@ -36,9 +44,6 @@ jobs: - name: Install pnpm dependencies run: pnpm install --no-frozen-lockfile - - name: Run build - run: pnpm run build - - name: Run bundlewatch run: pnpm run bundlewatch env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 495e3bd68..e924c4d23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,8 +1,7 @@ name: Test build on: - pull_request: - types: [ opened, reopened ] + pull_request: null env: NODE: 20 @@ -17,6 +16,14 @@ jobs: - name: Clone repository uses: actions/checkout@v4 + - name: Cache turbo build setup + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + - name: Set up Node.js uses: actions/setup-node@v4 with: diff --git a/package.json b/package.json index 35726bfd4..489d5869d 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "build": "turbo build", "dev": "turbo dev", "clean": "turbo clean", + "bundlewatch": "turbo bundlewatch", "version": "changeset version", "publish": "changeset publish", "reformat-mdx": "node build/reformat-mdx.mjs" diff --git a/turbo.json b/turbo.json index 87c19f5f2..92fbe83d8 100644 --- a/turbo.json +++ b/turbo.json @@ -18,6 +18,12 @@ "^clean" ], "cache": false + }, + "bundlewatch": { + "dependsOn": [ + "^bundlewatch", + "^build" + ] } } } \ No newline at end of file