Skip to content

unit-test-refresh

unit-test-refresh #199

name: unit-test-refresh
on:
schedule:
# auto-refresh every Sunday evening
- cron: '0 22 * * 0'
# can be run manually on https://github.com/cockpit-project/cockpit/actions
workflow_dispatch:
jobs:
# we do both builds and all tests in a single run, so that we only upload the containers on success
refresh:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
timeout-minutes: 60
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
# need this to also fetch tags
fetch-depth: 0
- name: Build fresh containers
timeout-minutes: 10
run: containers/unit-tests/build
- name: Run amd64 gcc check-memory test
timeout-minutes: 20
run: containers/unit-tests/start --verbose --env=CC=gcc --image-tag=latest --make check-memory
- name: Run amd64 clang distcheck test
timeout-minutes: 15
run: containers/unit-tests/start --verbose --env=CC=clang --image-tag=latest --make distcheck
- name: Run i386 gcc distcheck test
timeout-minutes: 15
run: containers/unit-tests/start --verbose --env=CC=clang --image-tag=i386 --make distcheck
- name: Run amd64 gcc distcheck test for C bridge
timeout-minutes: 15
run: containers/unit-tests/start --verbose --env=CC=gcc --env=EXTRA_DISTCHECK_CONFIGURE_FLAGS=--enable-old-bridge --image-tag=latest --make distcheck
- name: Run pytest-cov test
timeout-minutes: 15
run: containers/unit-tests/start --verbose --env=CC=gcc --image-tag=latest --make pytest-cov
- name: Log into container registry
run: podman login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
- name: Push containers to registry
run: |
podman push ghcr.io/cockpit-project/unit-tests:latest
podman push ghcr.io/cockpit-project/unit-tests:i386