add node modules cache for CI tests #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run E2E tests | |
on: | |
push: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Node Modules | |
id: pnpm-cache | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Generate Prime Numbers | |
if: steps.pnpm-cache.outputs.cache-hit != 'true' | |
run: pnpm i --frozen-lockfile | |
- name: Build | |
run: pnpm build | |
- name: Serve | |
run: pnpm run preview:node | |
- name: Serve | |
run: pnpm run test:preview |