Refactor API endpoints into Server Actions #295
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: Test | |
on: | |
pull_request: | |
paths: | |
- nextjs-13/** | |
jobs: | |
test: | |
name: Run linters and tests Next.js 13 | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./nextjs-13 | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.11.0 | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node and restore cached dependencies | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
cache-dependency-path: 'nextjs-13/package-lock.json' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run linter | |
run: npm run lint | |
- name: Run unit tests | |
run: npm run test:coverage |