9 group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
10 cancel-in-progress: true
15 runs-on: ubuntu-latest
104 - stateofthemap-container
105 - stateofthemap-wordpress
132 - suite: stateofthemap-wordpress
190 - name: Check out code
191 uses: actions/checkout@v6
192 - name: Extract cinc image details from .kitchen.yml
195 CINC_IMAGE=$(grep 'chef_image:' .kitchen.yml | head -1 | awk '{print $2}')
196 CINC_VERSION=$(grep 'chef_version:' .kitchen.yml | head -1 | awk '{print $2}')
197 echo "cinc_container_image=${CINC_IMAGE}" >> "$GITHUB_OUTPUT"
198 echo "cinc_container_version=${CINC_VERSION}" >> "$GITHUB_OUTPUT"
199 echo "cinc_container_ref=${CINC_IMAGE}:${CINC_VERSION}" >> "$GITHUB_OUTPUT"
200 - name: Login to GitHub Container Registry
201 uses: docker/login-action@v4
204 username: ${{ github.actor }}
205 password: ${{ secrets.GITHUB_TOKEN }}
206 - name: Cache cinc container image
208 uses: actions/cache@v5
210 path: /tmp/cinc-image.tar
211 key: docker-cinc-${{ steps.cinc-image.outputs.cinc_container_version }}-${{ runner.arch }}
212 - name: Pull and save cinc container image
213 if: steps.cache-cinc.outputs.cache-hit != 'true'
215 docker pull "${{ steps.cinc-image.outputs.cinc_container_ref }}"
216 docker save "${{ steps.cinc-image.outputs.cinc_container_ref }}" -o /tmp/cinc-image.tar
217 - name: Load cinc container image from cache
218 if: steps.cache-cinc.outputs.cache-hit == 'true'
219 run: docker load -i /tmp/cinc-image.tar
221 uses: ruby/setup-ruby@v1
224 - name: Run kitchen test ${{ matrix.suite }}-${{ matrix.os }}
225 run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
226 - name: Gather journal output
228 bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl --since=yesterday"
229 bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "networkctl status --all"
230 bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "resolvectl status" || true