chore(ci): add artifact upload and download steps in CI pipeline for improved build process

This commit is contained in:
taroj1205 2025-06-22 20:11:02 +12:00
parent 824df2009e
commit 1e0b6821f3
No known key found for this signature in database
GPG key ID: 0FCB6CFFE0981AB7
2 changed files with 17 additions and 10 deletions

View file

@ -171,6 +171,13 @@ jobs:
- name: Build project - name: Build project
run: pnpm exec turbo run build run: pnpm exec turbo run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
retention-days: 1
playwright: playwright:
name: Playwright Tests name: Playwright Tests
needs: [check_changes, setup, build] needs: [check_changes, setup, build]
@ -179,12 +186,18 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Restore Turborepo Cache - name: Restore Turborepo Cache
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: .turbo path: .turbo
key: ${{ runner.os }}-turbo-build-${{ github.sha }} key: ${{ runner.os }}-turbo-playwright-${{ github.sha }}
restore-keys: ${{ runner.os }}-turbo-build- restore-keys: ${{ runner.os }}-turbo-playwright-
- name: Restore node_modules cache - name: Restore node_modules cache
id: cache id: cache
@ -218,7 +231,7 @@ jobs:
restore-keys: ${{ runner.os }}-playwright-browsers- restore-keys: ${{ runner.os }}-playwright-browsers-
- name: Install 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) - name: Run Playwright Tests (4 Shards)
run: pnpm exec turbo run test:e2e:all run: pnpm exec turbo run test:e2e:all

View file

@ -59,13 +59,7 @@
}, },
"test:e2e:all": { "test:e2e:all": {
"cache": true, "cache": true,
"dependsOn": [ "dependsOn": ["test:e2e:shard1", "test:e2e:shard2", "test:e2e:shard3", "test:e2e:shard4"],
"^build",
"test:e2e:shard1",
"test:e2e:shard2",
"test:e2e:shard3",
"test:e2e:shard4"
],
"inputs": ["src/**/*"], "inputs": ["src/**/*"],
"outputs": ["playwright-report/**", "test-results/**"] "outputs": ["playwright-report/**", "test-results/**"]
} }