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