Skip to content

Commit

Permalink
Merge pull request #1 from haraldkri/testing
Browse files Browse the repository at this point in the history
Add pipeline for running unit tests
  • Loading branch information
haraldkri committed Sep 10, 2024
2 parents 508f1aa + 818bfaa commit 26ac185
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Run Unit Tests

on:
push:
branches:
- develop
- master
- testing
pull_request:
branches:
- develop
- master

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.17.0'

- name: Install Firebase CLI
run: npm install -g firebase-tools

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Run Unit Tests
run: pnpm run test:ci
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"emulators:start": "firebase emulators:start --only firestore"
"emulators:start": "firebase emulators:start --only firestore",
"test:ci": "firebase emulators:exec --only firestore \"pnpm run test\""
},
"engines": {
"node": "18.20.4 || 20.17.0 || >=22.8"
Expand Down

0 comments on commit 26ac185

Please sign in to comment.