Skip to content

E2E test for a Collection page #819

E2E test for a Collection page

E2E test for a Collection page #819

Workflow file for this run

name: Unit Test
on:
pull_request:
merge_group:
workflow_dispatch:
env:
NEXT_TELEMETRY_DISABLED: 1
HUSKY: 0
jobs:
unit-test:
name: Unit Tests
if: github.event.action != 'closed'
runs-on: ubuntu-latest
env:
# Triggers loading env vars from .env.test
NODE_ENV: test
# Required for API access during typechecking
TAKESHAPE_API_KEY: ${{ secrets.TAKESHAPE_API_KEY }}
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Install modules
run: npm ci
- name: Run graphql:typegen
run: npm run graphql:typegen
- name: Run typecheck
run: npm run typecheck
- name: Run eslint
run: npm run lint
- name: Run graphql:validate
run: npm run graphql:validate
- name: Run tests
run: npm test