Unverified 提交 89f509fc authored 作者: Will Chen's avatar Will Chen 提交者: GitHub

Cache pnpm scaffold deps and postfix playwright artifacts (#380)

上级 66f1bf20
...@@ -39,6 +39,25 @@ jobs: ...@@ -39,6 +39,25 @@ jobs:
node-version-file: package.json node-version-file: package.json
cache: npm cache: npm
cache-dependency-path: package-lock.json cache-dependency-path: package-lock.json
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
version: latest
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
# Not strictly needed but makes the e2e tests faster (and less flaky)
- name: Install scaffold dependencies
run: cd scaffold && pnpm install
- name: Install node modules - name: Install node modules
run: npm install run: npm install
- name: Presubmit check (e.g. lint, format) - name: Presubmit check (e.g. lint, format)
...@@ -66,12 +85,12 @@ jobs: ...@@ -66,12 +85,12 @@ jobs:
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
if: failure() if: failure()
with: with:
name: playwright-report name: playwright-report-${{runner.os}}
path: playwright-report/ path: playwright-report/
retention-days: 3 retention-days: 3
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
if: failure() if: failure()
with: with:
name: test-results name: test-results-${{runner.os}}
path: test-results/ path: test-results/
retention-days: 3 retention-days: 3
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论