Skip to content

v0.1.0.0-alpha

v0.1.0.0-alpha #34

name: Build and test .NET projects
on:
push:
branches:
- main
- releases/*
create:
branches:
- releases/*
tags:
- releases/*
pull_request:
branches:
- main
jobs:
build:
name: Build ${{ matrix.display-name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
configuration: ['debug', 'release']
include:
- configuration: 'debug'
display-name: 'Debug'
- configuration: 'release'
display-name: 'Release'
steps:
- uses: actions/checkout@v1
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Build
run: find . -name "*.csproj" | xargs -I {} dotnet build "{}" --configuration ${{ matrix.configuration }}
test:
name: Test ${{ matrix.display-name }}
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dotnet-version: ['8.0', '9.0']
include:
- dotnet-version: '8.0'
display-name: '.NET 8.0'
framework: 'net8.0'
install-version: '8.0.x'
- dotnet-version: '9.0'
display-name: '.NET 9.0'
framework: 'net9.0'
install-version: '9.0.x'
steps:
- uses: actions/checkout@v1
- name: Setup ${{ matrix.display-name }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.install-version }}
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
if: ${{ matrix.install-version != '9.0.x' }}
with:
dotnet-version: 9.0.x
- name: Test
id: tests
run: |
find . -name "*.csproj" | xargs -I {} dotnet test "{}" \
--framework ${{ matrix.framework }}