Skip to content

Commit

Permalink
build: add lint and unit tests to ci
Browse files Browse the repository at this point in the history
Add building, linting, and unit testing to a new GitHub action workflow.
  • Loading branch information
SVendittelli committed Nov 12, 2023
1 parent 75060e8 commit 328d129
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Node.js CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
unit-tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm run test:ci
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"prepare": "husky install",
"start": "next start",
"test": "jest --watch",
"test:ci": "jest --ci",
"test:e2e": "playwright test"
},
"lint-staged": {
Expand Down

0 comments on commit 328d129

Please sign in to comment.