Skip to content

Commit

Permalink
[#54] Add workflow for next.js 13 appliaction
Browse files Browse the repository at this point in the history
  • Loading branch information
tednguyendev committed May 24, 2023
1 parent 73ac973 commit 60e422f
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/nextjs_13_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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

0 comments on commit 60e422f

Please sign in to comment.