@@ -9,34 +9,23 @@ concurrency:
99 group : ${{ github.head_ref || github.sha }}-${{ github.workflow }}
1010 cancel-in-progress : true
1111jobs :
12+ define-matrix :
13+ runs-on : ubuntu-latest
14+ outputs :
15+ matrix : ${{ steps.set-matrix.outputs.matrix }}
16+ steps :
17+ - uses : actions/checkout@v4
18+ - id : set-matrix
19+ # See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#example-returning-a-json-object
20+ run : echo "matrix=$(cat apt.matrix.json | jq --compact-output)" >> $GITHUB_OUTPUT
21+ working-directory : .github/workflows/
1222 build :
1323 name : Build
1424 timeout-minutes : 120
25+ needs : define-matrix
1526 strategy :
1627 fail-fast : false
17- matrix :
18- label :
19- - Debian bullseye amd64
20- - Debian bookworm amd64
21- - Ubuntu Focal amd64
22- - Ubuntu Jammy amd64
23- - Ubuntu Noble amd64
24- include :
25- - label : Debian bullseye amd64
26- rake-job : debian-bullseye
27- test-docker-image : debian:bullseye
28- - label : Debian bookworm amd64
29- rake-job : debian-bookworm
30- test-docker-image : debian:bookworm
31- - label : Ubuntu Focal amd64
32- rake-job : ubuntu-focal
33- test-docker-image : ubuntu:focal
34- - label : Ubuntu Jammy amd64
35- rake-job : ubuntu-jammy
36- test-docker-image : ubuntu:jammy
37- - label : Ubuntu Noble amd64
38- rake-job : ubuntu-noble
39- test-docker-image : ubuntu:noble
28+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
4029 runs-on : ubuntu-latest
4130 steps :
4231 - uses : actions/checkout@v4
@@ -92,10 +81,36 @@ jobs:
9281 with :
9382 name : packages-lts-apt-source-${{ matrix.rake-job }}
9483 path : fluent-lts-apt-source/apt/repositories
95- # TODO move the following steps to "Test" job
84+
85+ check_package_size :
86+ name : Check Package Size
87+ runs-on : ubuntu-latest
88+ needs : [define-matrix, build]
89+ strategy :
90+ fail-fast : false
91+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
92+ steps :
93+ - uses : actions/checkout@v4
94+ - uses : actions/download-artifact@v4
95+ with :
96+ name : packages-${{ matrix.rake-job }}
97+ path : fluent-package/apt/repositories
9698 - name : Check Package Size
9799 run : |
98100 fluent-package/apt/pkgsize-test.sh ${{ matrix.rake-job }} amd64
101+ installation_test :
102+ name : Installation Test
103+ runs-on : ubuntu-latest
104+ needs : [define-matrix, build]
105+ strategy :
106+ fail-fast : false
107+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
108+ steps :
109+ - uses : actions/checkout@v4
110+ - uses : actions/download-artifact@v4
111+ with :
112+ name : packages-${{ matrix.rake-job }}
113+ path : fluent-package/apt/repositories
99114 - name : Installation Test
100115 run : |
101116 mkdir -p .bundle
@@ -106,6 +121,19 @@ jobs:
106121 --volume ${PWD}:/fluentd:ro \
107122 ${{ matrix.test-docker-image }} \
108123 /fluentd/fluent-package/apt/install-test.sh
124+ piuparts_test :
125+ name : Piuparts Test
126+ runs-on : ubuntu-latest
127+ needs : [define-matrix, build]
128+ strategy :
129+ fail-fast : false
130+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
131+ steps :
132+ - uses : actions/checkout@v4
133+ - uses : actions/download-artifact@v4
134+ with :
135+ name : packages-${{ matrix.rake-job }}
136+ path : fluent-package/apt/repositories
109137 - name : Piuparts (Install/Remove/Upgrade) Test
110138 run : |
111139 mkdir -p .bundle
@@ -117,6 +145,19 @@ jobs:
117145 --volume ${PWD}:/fluentd:ro \
118146 ${{ matrix.test-docker-image }} \
119147 /fluentd/fluent-package/apt/piuparts-test.sh
148+ serverspec_test :
149+ name : Serverspec Test
150+ runs-on : ubuntu-latest
151+ needs : [define-matrix, build]
152+ strategy :
153+ fail-fast : false
154+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
155+ steps :
156+ - uses : actions/checkout@v4
157+ - uses : actions/download-artifact@v4
158+ with :
159+ name : packages-${{ matrix.rake-job }}
160+ path : fluent-package/apt/repositories
120161 - name : Serverspec Test
121162 run : |
122163 mkdir -p .bundle
@@ -127,6 +168,19 @@ jobs:
127168 --volume ${PWD}:/fluentd:ro \
128169 ${{ matrix.test-docker-image }} \
129170 /fluentd/fluent-package/apt/serverspec-test.sh
171+ confluent_test :
172+ name : Confluent Test
173+ runs-on : ubuntu-latest
174+ needs : [define-matrix, build]
175+ strategy :
176+ fail-fast : false
177+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
178+ steps :
179+ - uses : actions/checkout@v4
180+ - uses : actions/download-artifact@v4
181+ with :
182+ name : packages-${{ matrix.rake-job }}
183+ path : fluent-package/apt/repositories
130184 - name : Confluent Test
131185 run : |
132186 mkdir -p .bundle
@@ -137,6 +191,19 @@ jobs:
137191 --volume ${PWD}:/fluentd:ro \
138192 ${{ matrix.test-docker-image }} \
139193 /fluentd/fluent-package/apt/confluent-test.sh
194+ binstubs_test :
195+ name : Binstubs Test
196+ needs : [define-matrix, build]
197+ runs-on : ubuntu-latest
198+ strategy :
199+ fail-fast : false
200+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
201+ steps :
202+ - uses : actions/checkout@v4
203+ - uses : actions/download-artifact@v4
204+ with :
205+ name : packages-${{ matrix.rake-job }}
206+ path : fluent-package/apt/repositories
140207 - name : Binstubs Test
141208 run : |
142209 mkdir -p .bundle
@@ -149,7 +216,7 @@ jobs:
149216 /fluentd/fluent-package/apt/binstubs-test.sh
150217 test :
151218 name : Test ${{ matrix.label }} ${{ matrix.test }}
152- needs : build
219+ needs : [check_package_size, installation_test, piuparts_test, serverspec_test, confluent_test, binstubs_test]
153220 runs-on : ubuntu-latest
154221 timeout-minutes : 15
155222 strategy :
0 commit comments