Skip to content

Update CI configuration for .NET 10 and Fedora 43 #728

Update CI configuration for .NET 10 and Fedora 43

Update CI configuration for .NET 10 and Fedora 43 #728

Workflow file for this run

name: Confirm tests run successfully
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Verify tests pass
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
container_image:
- docker.io/library/alpine:latest
- docker.io/library/alpine:edge
- quay.io/centos/centos:stream9
- quay.io/centos/centos:stream10
- registry.fedoraproject.org/fedora:42
- registry.fedoraproject.org/fedora:43
- registry.fedoraproject.org/fedora:rawhide
- registry.access.redhat.com/ubi8
- registry.access.redhat.com/ubi9
- registry.access.redhat.com/ubi10
dotnet_version:
- "8.0"
- "9.0"
- "10.0"
exclude:
- container_image: docker.io/library/alpine:latest
dotnet_version: "9.0"
- container_image: docker.io/library/alpine:edge
dotnet_version: "9.0"
container:
image: ${{ matrix.container_image }}
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v4
- name: Install .NET ${{ matrix.dotnet_version }}
# .NET 9 introduced the 'dotnet-sdk-aot' package
# .NET 8 introduced the 'dbg' packages
# '/etc/os-release' will also match the grep fedora for Fedora derived systems, such as CentOS.
timeout-minutes: 10
run: |
set -euo pipefail
cat /etc/os-release
if grep fedora /etc/os-release; then
if [[ ${{ matrix.dotnet_version }} == 10.* ]]; then
dnf install 'dnf-command(copr)' -y
if grep centos /etc/os-release; then
dnf copr enable @dotnet-sig/dotnet-preview centos-stream-10-x86_64 -y
else
dnf copr enable @dotnet-sig/dotnet-preview -y
fi
fi
dnf install -y dotnet-sdk-${{ matrix.dotnet_version }}
dnf install -y \
dotnet-sdk-dbg-${{ matrix.dotnet_version }} \
dotnet-runtime-dbg-${{ matrix.dotnet_version }} \
aspnetcore-runtime-dbg-${{ matrix.dotnet_version }}
if [[ ${{ matrix.dotnet_version }} != 8.* ]]; then
dnf install -y dotnet-sdk-aot-${{ matrix.dotnet_version }}
fi
elif grep alpine /etc/os-release; then
if grep edge /etc/os-release; then
echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
fi
apk add dotnet-sdk-${{ matrix.dotnet_version }} dotnet-doc
apk add \
dotnet-sdk-dbg-${{ matrix.dotnet_version }} \
dotnet-runtime-dbg-${{ matrix.dotnet_version }} \
aspnetcore-runtime-dbg-${{ matrix.dotnet_version }}
if [[ ${{ matrix.dotnet_version }} != 8.* ]]; then
apk add dotnet-sdk-aot-${{ matrix.dotnet_version }}
fi
fi
dotnet --info
- name: Install Test dependencies
timeout-minutes: 5
run: |
if grep fedora /etc/os-release ; then
dnf install -y python3 wget $(grep '^Dependencies(dnf): ' README.md | cut -d: -f2-) --skip-broken
elif grep alpine /etc/os-release; then
apk add python3 wget curl $(grep '^Dependencies(apk): ' README.md | cut -d: -f2-)
echo -e '[PostgreSQL]\nDescription=PostgreSQL Unicode\nDriver=/usr/lib/psqlodbcw.so\nUsageCount=1' > /etc/odbcinst.ini
fi
- name: Download test runner
run: |
set -euo pipefail
wget --no-verbose https://github.com/redhat-developer/dotnet-bunny/releases/latest/download/turkey.tar.gz
tar xf turkey.tar.gz
- name: Run tests
run: |
set -euo pipefail
trait_flags=()
if [[ ${{ matrix.container_image }} == *ubi8 ]] ; then
trait_flags+=( --trait ubi8-repos )
fi
if [[ ${{ matrix.container_image }} == *ubi9 ]] ; then
trait_flags+=( --trait ubi9-repos )
fi
if [[ ${{ matrix.container_image }} == *ubi10 ]] ; then
trait_flags+=( --trait ubi9-repos )
fi
dotnet turkey/Turkey.dll -v --timeout 600 --trait github-ci "${trait_flags[@]}"
shell: bash
- name: Show Logs
if: ${{ always() }}
run: |
set -euo pipefail
find -iname '*.log' -exec echo {} \; -exec cat {} \;