Skip to content

Update main.yml

Update main.yml #2

Workflow file for this run

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 }}