Skip to content

Commit

Permalink
Add unit test job.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsommardahl committed Apr 18, 2024
1 parent 55206e5 commit da6b3d6
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:
build:
name: 🛠️ Build Frontend Artifact
needs:
- audit
- lint
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -67,4 +68,28 @@ jobs:
run: cd frontend && npm i

- name: 😂 Lint code
run: cd frontend && npm run lint
run: cd frontend && npm run lint

test:
name: 🧪 Run Unit Tests
needs: audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Cache Node Modules
uses: actions/cache@v3
with:
path: frontend/node_modules
key: fe-node-${{ hashFiles('frontend/package-lock.json') }}

- name: Install deps
run: cd frontend && npm i

- name: Run the unit tests
run: cd frontend && npm run test-ci

0 comments on commit da6b3d6

Please # to comment.