Skip to content

šŸ”„ synced file(s) with prom-client-net/prom-client-tmpl #86

šŸ”„ synced file(s) with prom-client-net/prom-client-tmpl

šŸ”„ synced file(s) with prom-client-net/prom-client-tmpl #86

Workflow file for this run

name: Build
on:
pull_request:
branches:
- "main"
workflow_dispatch:
workflow_call:
permissions:
contents: read
jobs:
build:
name: Build & Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
10.0.x
- name: Build
run: dotnet build -c Release
- name: Run tests without Coverage
if: startsWith(matrix.os, 'windows')
run: dotnet test --no-build -c Release -p:CollectCoverage=false
- name: Run tests with Coverage
if: startsWith(matrix.os, 'ubuntu')
run: dotnet test --no-build -c Release -p:CollectCoverage=true -e:CoverletOutputFormat=opencover
- name: Publish to Codecov
if: startsWith(matrix.os, 'ubuntu')
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
⚔