diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bf3af1..c3bb1ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,10 +39,26 @@ jobs: node-version-file: package.json cache: npm 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 uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 with: 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 id: pnpm-cache shell: bash @@ -58,20 +74,8 @@ jobs: # 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 - 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: Install nextjs-template dependencies + run: cd nextjs-template && pnpm install - name: Install Chromium browser for Playwright run: npx playwright install chromium --with-deps - name: Build