Skip to content

Commit 5f70c3b

Browse files
committed
feat: Add workflow to run and validate unit tests
1 parent ad411a1 commit 5f70c3b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/unit-test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Run Unit Tests
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
run-tests:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '22.x'
18+
19+
- name: Install dependencies for all plugins
20+
run: |
21+
npm run setup-repo-old
22+
23+
- name: Run tests for Audit plugin
24+
working-directory: ./packages/contentstack-audit
25+
run: npm run test:unit
26+
27+
- name: Run tests for Export to CSV plugin
28+
working-directory: ./packages/contentstack-export-to-csv
29+
run: npm run test:unit

0 commit comments

Comments
 (0)