From 1e0b6821f3067a20b3b505ba8c9e02d87711485c Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Sun, 22 Jun 2025 20:11:02 +1200 Subject: [PATCH] chore(ci): add artifact upload and download steps in CI pipeline for improved build process --- .github/workflows/ci-pipeline.yml | 19 ++++++++++++++++--- turbo.json | 8 +------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 7eff68c..3b1315b 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -171,6 +171,13 @@ jobs: - name: Build project run: pnpm exec turbo run build + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + retention-days: 1 + playwright: name: Playwright Tests needs: [check_changes, setup, build] @@ -179,12 +186,18 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + - name: Restore Turborepo Cache uses: actions/cache@v4 with: path: .turbo - key: ${{ runner.os }}-turbo-build-${{ github.sha }} - restore-keys: ${{ runner.os }}-turbo-build- + key: ${{ runner.os }}-turbo-playwright-${{ github.sha }} + restore-keys: ${{ runner.os }}-turbo-playwright- - name: Restore node_modules cache id: cache @@ -218,7 +231,7 @@ jobs: restore-keys: ${{ runner.os }}-playwright-browsers- - name: Install Playwright Browsers - run: pnpm exec playwright install --with-deps + run: pnpm exec playwright install --with-deps firefox - name: Run Playwright Tests (4 Shards) run: pnpm exec turbo run test:e2e:all diff --git a/turbo.json b/turbo.json index 270a6c4..b7226c2 100644 --- a/turbo.json +++ b/turbo.json @@ -59,13 +59,7 @@ }, "test:e2e:all": { "cache": true, - "dependsOn": [ - "^build", - "test:e2e:shard1", - "test:e2e:shard2", - "test:e2e:shard3", - "test:e2e:shard4" - ], + "dependsOn": ["test:e2e:shard1", "test:e2e:shard2", "test:e2e:shard3", "test:e2e:shard4"], "inputs": ["src/**/*"], "outputs": ["playwright-report/**", "test-results/**"] }