Update penny to use the app folder #909
Workflow file for this run
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: 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@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.node-version' | |
cache: 'npm' | |
- name: Cache node_modules | |
uses: actions/cache@v4 | |
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 |