Update main.yml #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| base_image: ["ubuntu:noble", "debian:bookworm"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-docker-${{ matrix.base_image }}-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-docker-${{ matrix.base_image }}- | |
| - name: Build docker image | |
| run: | | |
| docker buildx build \ | |
| --cache-from type=local,src=/tmp/.buildx-cache \ | |
| --cache-to type=local,dest=/tmp/.buildx-cache,mode=max \ | |
| --build-arg BASE_IMAGE=${{ matrix.base_image }} \ | |
| -t testcms . | |
| - name: Run tests | |
| run: docker compose -p cms -f docker/docker-compose.test.yml run --rm --attach-dependencies testcms | |
| - name: Upload all coverage to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./codecov/unittests.xml,./codecov/functionaltests.xml | |
| flags: unittests,functionaltests | |
| token: ${{ secrets.CODECOV_TOKEN }} |