Skip to content

Ubuntu

Ubuntu #34

Workflow file for this run

name: Ubuntu
on:
# Allow to use "gh.exe workflow run Ubuntu --ref <branchname>" to trigger this workflow for arbitrary branches.
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]
dotnet-version: ['8.0.x']
tfm: ['net8.0']
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so that nbgv can do its work.
- name: Setup .NET (64 bit)
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Build
run: >
dotnet build
--framework ${{ matrix.tfm }}
--configuration ${{ matrix.configuration }}
- name: Test
run: >
dotnet test
--no-build
--framework ${{ matrix.tfm }}
--collect "Code Coverage;Format=Cobertuna"
--verbosity normal
--configuration ${{ matrix.configuration }}
--logger trx
--results-directory "TestResults-${{ matrix.tfm }}-${{ matrix.configuration }}"
- name: Generage coverage report
uses: danielpalme/[email protected]
with:
reports: '${{ github.workspace }}/TestResults-${{ matrix.tfm }}-${{ matrix.configuration }}/**/*.cobertura.xml'
targetdir: '${{ github.workspace }}/coveragereport'
reporttypes: 'MarkdownSummaryGithub'
- name: Add coverage report to summary
run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMAMRY
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.tfm }}-${{ matrix.configuration }}
path: TestResults-${{ matrix.tfm }}-${{ matrix.configuration }}
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}