1- name : Test
1+ name : Checks
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [main]
66 paths-ignore :
7- - ' mkdocs.yml'
8- - ' docs/**'
9- - ' README.md'
7+ - " mkdocs.yml"
8+ - " docs/**"
9+ - " README.md"
1010 pull_request :
11- branches : [ main ]
11+ branches : [main]
1212 paths-ignore :
13- - ' mkdocs.yml'
14- - ' docs/**'
15- - ' README.md'
13+ - " mkdocs.yml"
14+ - " docs/**"
15+ - " README.md"
1616
1717concurrency :
1818 group : " ${{ github.workflow }}-${{ github.head_ref || github.sha }}"
1919 cancel-in-progress : true
2020
2121jobs :
2222 detect-modules :
23- runs-on : ubuntu-latest
23+ name : Detect packages to check
24+ runs-on : ubuntu-22.04
2425 outputs :
2526 modules : ${{ steps.set-modified-modules.outputs.modules }}
2627 modules_count : ${{ steps.set-modified-modules-count.outputs.modules_count }}
4849 echo "${{ steps.set-modified-modules.outputs.modules }}"
4950
5051 lint :
51- # only run if there are modules to lint
52- if : ${{ needs.detect-modules.outputs.modules_count > 0 }}
52+ if : ${{ needs.detect- modules.outputs.modules_count > 0 }}
53+ name : " Lint "
5354 needs :
5455 - detect-modules
5556 strategy :
@@ -58,38 +59,36 @@ jobs:
5859 module : ${{ fromJSON(needs.detect-modules.outputs.modules) }}
5960 runs-on : ubuntu-22.04
6061 steps :
61- - name : Code checkout
62- uses : actions/checkout@v4
63- - name : Install Node and Dependencies
64- id : npm-install
65- uses : ./.github/actions/npm-setup
66- with :
67- runner : ubuntu-22.04
68- node-version : 22.x
69- workspace : " ${{ matrix.module }}"
70- - name : Code linting
71- env :
72- WORKSPACE_PATH : ${{ steps.npm-install.outputs.workspace_path }}
73- run : npm run lint:ci
62+ - name : Code checkout
63+ uses : actions/checkout@v4
64+ - name : Install Node and Dependencies
65+ id : npm-install
66+ uses : ./.github/actions/npm-setup
67+ with :
68+ runner : ubuntu-22.04
69+ node-version : 22.x
70+ workspace : " ${{ matrix.module }}"
71+ - name : Code linting
72+ env :
73+ WORKSPACE_PATH : ${{ steps.npm-install.outputs.workspace_path }}
74+ run : npm run lint:ci
7475
7576 smoke-test :
76- # only run if there are modules to lint
77- if : ${{ needs.detect-modules.outputs.modules_count > 0 }}
77+ if : ${{ needs.detect-modules.outputs.modules_count > 0 }}
7878 needs :
7979 - detect-modules
8080 - lint
81- name : Smoke test
81+ name : Smoke tests
8282 strategy :
8383 fail-fast : true
8484 matrix :
85- runner : [ ubuntu-22.04 ]
86- node-version : [ 18.x, 20.x, 22.x ]
85+ runner : [ubuntu-22.04]
86+ node-version : [18.x, 20.x, 22.x]
8787 runs-on : ${{ matrix.runner }}
8888 steps :
8989 - name : Code checkout
9090 uses : actions/checkout@v4
9191
92- # Uses a composite action for a consistent NPM install including cache
9392 - name : Install Node ${{ matrix.node-version }} and Dependencies
9493 uses : ./.github/actions/npm-setup
9594 with :
@@ -107,9 +106,8 @@ jobs:
107106 run : node packages/testcontainers/smoke-test.mjs
108107
109108 test :
110- name : Run tests
111- # only run if there are modules to test
112- if : ${{ needs.detect-modules.outputs.modules_count > 0 }}
109+ if : ${{ needs.detect-modules.outputs.modules_count > 0 }}
110+ name : Docker tests
113111 needs :
114112 - detect-modules
115113 - lint
@@ -118,7 +116,7 @@ jobs:
118116 fail-fast : false
119117 matrix :
120118 module : ${{ fromJSON(needs.detect-modules.outputs.modules) }}
121- node-version : [ 18.x, 20.x, 22.x ]
119+ node-version : [18.x, 20.x, 22.x]
122120 uses : ./.github/workflows/test-template.yml
123121 with :
124122 runner : ubuntu-22.04
@@ -127,9 +125,8 @@ jobs:
127125 workspace : " ${{ matrix.module }}"
128126
129127 test-podman :
130- name : Run tests
131- # only run if there are modules to test
132- if : ${{ needs.detect-modules.outputs.modules_count > 0 }}
128+ if : ${{ needs.detect-modules.outputs.modules_count > 0 }}
129+ name : Podman tests
133130 needs :
134131 - detect-modules
135132 - lint
@@ -139,24 +136,24 @@ jobs:
139136 fail-fast : false
140137 matrix :
141138 module : ${{ fromJSON(needs.detect-modules.outputs.modules) }}
142- node-version : [ 18.x, 20.x, 22.x ]
139+ node-version : [18.x, 20.x, 22.x]
143140 uses : ./.github/workflows/test-template.yml
144141 with :
145142 runner : ubuntu-22.04
146143 node-version : ${{ matrix.node-version }}
147144 container-runtime : podman
148145 workspace : " ${{ matrix.module }}"
149146
150- # This job serves as confirmation that all test jobs finished
151147 end :
152148 if : ${{ needs.detect-modules.outputs.modules_count > 0 }}
149+ name : Checks complete
153150 needs :
154151 - detect-modules
155152 - lint
156153 - smoke-test
157154 - test
158155 - test-podman
159- runs-on : ubuntu-latest
156+ runs-on : ubuntu-22.04
160157 steps :
161158 - name : Check if any jobs failed
162159 if : ${{ failure() || cancelled() }}
0 commit comments