-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (39 loc) · 1.12 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: PR workflow
on:
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm install
- name: Run unit tests
run: npm run test:unit
integration-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm install
- name: Run integration tests
run: npm run test:integration
merge-check:
needs: [test, integration-test]
runs-on: ubuntu-latest
steps:
- name: Check test status
if: ${{ needs.test.result != 'success' || needs.integration-test.result != 'success' }}
run: exit 1 # Exit with a non-zero status code if tests fail