@@ -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
14- timeout-minutes : 60
24+ 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
@@ -64,10 +53,36 @@ jobs:
6453 with :
6554 name : packages-lts-apt-source-${{ matrix.rake-job }}
6655 path : fluent-lts-apt-source/apt/repositories
67- # TODO move the following steps to "Test" job
56+
57+ check_package_size :
58+ name : Check Package Size
59+ runs-on : ubuntu-latest
60+ needs : [define-matrix, build]
61+ strategy :
62+ fail-fast : false
63+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
64+ steps :
65+ - uses : actions/checkout@v4
66+ - uses : actions/download-artifact@v4
67+ with :
68+ name : packages-${{ matrix.rake-job }}
69+ path : fluent-package/apt/repositories
6870 - name : Check Package Size
6971 run : |
7072 fluent-package/apt/pkgsize-test.sh ${{ matrix.rake-job }} amd64
73+ installation_test :
74+ name : Installation Test
75+ runs-on : ubuntu-latest
76+ needs : [define-matrix, build]
77+ strategy :
78+ fail-fast : false
79+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
80+ steps :
81+ - uses : actions/checkout@v4
82+ - uses : actions/download-artifact@v4
83+ with :
84+ name : packages-${{ matrix.rake-job }}
85+ path : fluent-package/apt/repositories
7186 - name : Installation Test
7287 run : |
7388 mkdir -p .bundle
7792 --volume ${PWD}:/fluentd:ro \
7893 ${{ matrix.test-docker-image }} \
7994 /fluentd/fluent-package/apt/install-test.sh
95+ piuparts_test :
96+ name : Piuparts Test
97+ runs-on : ubuntu-latest
98+ needs : [define-matrix, build]
99+ strategy :
100+ fail-fast : false
101+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
102+ steps :
103+ - uses : actions/checkout@v4
104+ - uses : actions/download-artifact@v4
105+ with :
106+ name : packages-${{ matrix.rake-job }}
107+ path : fluent-package/apt/repositories
80108 - name : Piuparts (Install/Remove/Upgrade) Test
81109 run : |
82110 mkdir -p .bundle
@@ -87,6 +115,19 @@ jobs:
87115 --volume ${PWD}:/fluentd:ro \
88116 ${{ matrix.test-docker-image }} \
89117 /fluentd/fluent-package/apt/piuparts-test.sh
118+ serverspec_test :
119+ name : Serverspec Test
120+ runs-on : ubuntu-latest
121+ needs : [define-matrix, build]
122+ strategy :
123+ fail-fast : false
124+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
125+ steps :
126+ - uses : actions/checkout@v4
127+ - uses : actions/download-artifact@v4
128+ with :
129+ name : packages-${{ matrix.rake-job }}
130+ path : fluent-package/apt/repositories
90131 - name : Serverspec Test
91132 run : |
92133 mkdir -p .bundle
@@ -96,6 +137,19 @@ jobs:
96137 --volume ${PWD}:/fluentd:ro \
97138 ${{ matrix.test-docker-image }} \
98139 /fluentd/fluent-package/apt/serverspec-test.sh
140+ confluent_test :
141+ name : Confluent Test
142+ runs-on : ubuntu-latest
143+ needs : [define-matrix, build]
144+ strategy :
145+ fail-fast : false
146+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
147+ steps :
148+ - uses : actions/checkout@v4
149+ - uses : actions/download-artifact@v4
150+ with :
151+ name : packages-${{ matrix.rake-job }}
152+ path : fluent-package/apt/repositories
99153 - name : Confluent Test
100154 run : |
101155 mkdir -p .bundle
@@ -105,6 +159,19 @@ jobs:
105159 --volume ${PWD}:/fluentd:ro \
106160 ${{ matrix.test-docker-image }} \
107161 /fluentd/fluent-package/apt/confluent-test.sh
162+ binstubs_test :
163+ name : Binstubs Test
164+ needs : [define-matrix, build]
165+ runs-on : ubuntu-latest
166+ strategy :
167+ fail-fast : false
168+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
169+ steps :
170+ - uses : actions/checkout@v4
171+ - uses : actions/download-artifact@v4
172+ with :
173+ name : packages-${{ matrix.rake-job }}
174+ path : fluent-package/apt/repositories
108175 - name : Binstubs Test
109176 run : |
110177 mkdir -p .bundle
@@ -116,7 +183,7 @@ jobs:
116183 /fluentd/fluent-package/apt/binstubs-test.sh
117184 test :
118185 name : Test ${{ matrix.label }} ${{ matrix.test-file }}
119- needs : build
186+ needs : [check_package_size, installation_test, piuparts_test, serverspec_test, confluent_test, binstubs_test]
120187 runs-on : ubuntu-latest
121188 timeout-minutes : 15
122189 strategy :
0 commit comments