Skip to content

Commit 27092f7

Browse files
committed
Add GitHub Action for catalog service tests
- Runs on pull requests and main branch pushes - Only triggers when catalog service files change - Runs npm install and npm test for the catalog service - Will show failing checks if unit tests fail
1 parent 8d86144 commit 27092f7

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Catalog Service Tests
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
paths:
7+
- 'backend/catalog/**'
8+
- '.github/workflows/catalog-tests.yml'
9+
push:
10+
branches: [ main ]
11+
paths:
12+
- 'backend/catalog/**'
13+
- '.github/workflows/catalog-tests.yml'
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
19+
defaults:
20+
run:
21+
working-directory: backend/catalog
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '20'
31+
cache: 'npm'
32+
cache-dependency-path: backend/catalog/package-lock.json
33+
34+
- name: Install dependencies
35+
run: npm install
36+
37+
- name: Run tests
38+
run: npm run test

0 commit comments

Comments
 (0)