+21
-2
.github/workflows/test.yml
+21
-2
.github/workflows/test.yml
···
1
-
name: Unit Tests
1
+
name: Tests
2
2
3
3
on:
4
4
push:
···
8
8
9
9
jobs:
10
10
test:
11
-
name: Unit Tests
11
+
name: Unit and Integration Tests
12
12
runs-on: ubuntu-latest
13
13
14
+
services:
15
+
docker:
16
+
image: docker:24-dind
17
+
options: --privileged
18
+
14
19
steps:
15
20
- name: Checkout code
16
21
uses: actions/checkout@v4
···
21
26
node-version: '18'
22
27
cache: 'npm'
23
28
29
+
- name: Cache node_modules
30
+
uses: actions/cache@v4
31
+
with:
32
+
path: ~/.npm
33
+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
34
+
restore-keys: |
35
+
${{ runner.os }}-node-
36
+
24
37
- name: Install dependencies
25
38
run: npm ci
26
39
27
40
- name: Run unit tests
28
41
run: npm run test:unit
42
+
43
+
- name: Run database integration tests
44
+
run: npm run test:integration:db
45
+
env:
46
+
# Testcontainers needs Docker
47
+
TESTCONTAINERS_RYUK_DISABLED: true