cache nextjs template (#381)

This commit is contained in:
Will Chen
2025-06-10 12:46:13 -07:00
committed by GitHub
parent 89f509fcfa
commit e7941bc6f7

View File

@@ -39,10 +39,26 @@ 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: Install node modules
run: npm install
- name: Presubmit check (e.g. lint, format)
# do not run this on Windows (it fails and not necessary)
if: contains(matrix.os.name, 'macos')
run: npm run presubmit
- name: Type-checking
# do not run this on windows (it's redunant)
if: contains(matrix.os.name, 'macos')
run: npm run ts
- name: Unit tests
# do not run this on windows (it's redunant)
if: contains(matrix.os.name, 'macos')
run: npm run test
- name: Setup pnpm - name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with: with:
version: latest version: latest
- name: Clone nextjs-template
run: git clone --depth 1 https://github.com/dyad-sh/nextjs-template.git nextjs-template
- name: Get pnpm store directory - name: Get pnpm store directory
id: pnpm-cache id: pnpm-cache
shell: bash shell: bash
@@ -58,20 +74,8 @@ jobs:
# Not strictly needed but makes the e2e tests faster (and less flaky) # Not strictly needed but makes the e2e tests faster (and less flaky)
- name: Install scaffold dependencies - name: Install scaffold dependencies
run: cd scaffold && pnpm install run: cd scaffold && pnpm install
- name: Install node modules - name: Install nextjs-template dependencies
run: npm install run: cd nextjs-template && pnpm install
- name: Presubmit check (e.g. lint, format)
# do not run this on Windows (it fails and not necessary)
if: contains(matrix.os.name, 'macos')
run: npm run presubmit
- name: Type-checking
# do not run this on windows (it's redunant)
if: contains(matrix.os.name, 'macos')
run: npm run ts
- name: Unit tests
# do not run this on windows (it's redunant)
if: contains(matrix.os.name, 'macos')
run: npm run test
- name: Install Chromium browser for Playwright - name: Install Chromium browser for Playwright
run: npx playwright install chromium --with-deps run: npx playwright install chromium --with-deps
- name: Build - name: Build