-
-
Notifications
You must be signed in to change notification settings - Fork 203
98 lines (93 loc) · 2.71 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Test
on:
push:
branches: [ main ]
paths-ignore:
- 'mkdocs.yml'
- 'docs/**'
- 'README.md'
pull_request:
branches: [ main ]
paths-ignore:
- 'mkdocs.yml'
- 'docs/**'
- 'README.md'
concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true
jobs:
smoke-test:
name: Smoke test
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner: [ ubuntu-22.04 ]
node-version: [ 16.x, 18.x, 20.x ]
steps:
- name: Code checkout
uses: actions/checkout@v3
- name: Install NodeJS ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci --omit=optional
- name: Build workspaces
run: npm run build -ws
- name: Remove dev dependencies
run: npm prune --omit=dev
- name: Run CommonJS module smoke test
run: node packages/testcontainers/smoke-test.js
- name: Run ES module smoke test
run: node packages/testcontainers/smoke-test.mjs
test-testcontainers:
name: Testcontainers
needs: smoke-test
strategy:
matrix:
node-version: [ 16.x, 18.x, 20.x ]
container-runtime: [ docker, docker-rootless, podman ]
include:
- container-runtime: docker
runner: ubuntu-22.04
- container-runtime: docker-rootless
runner: ubuntu-22.04
- container-runtime: podman
runner: ubuntu-22.04
uses: ./.github/workflows/test-template.yml
with:
runner: ${{ matrix.runner }}
node-version: ${{ matrix.node-version }}
container-runtime: ${{ matrix.container-runtime }}
workspace: packages/testcontainers
test-modules:
name: Module (${{ matrix.module }})
needs: test-testcontainers
strategy:
matrix:
node-version: [ 16.x, 18.x, 20.x ]
container-runtime: [ docker, docker-rootless, podman ]
include:
- container-runtime: docker
runner: ubuntu-22.04
- container-runtime: docker-rootless
runner: ubuntu-22.04
- container-runtime: podman
runner: ubuntu-22.04
module:
- arangodb
- elasticsearch
- hivemq
- kafka
- mongodb
- mysql
- nats
- neo4j
- postgresql
- selenium
uses: ./.github/workflows/test-template.yml
with:
runner: ${{ matrix.runner }}
node-version: ${{ matrix.node-version }}
container-runtime: ${{ matrix.container-runtime }}
workspace: packages/modules/${{ matrix.module }}