Skip to content

Merge pull request #39 from prplecake/dependabot/github_actions/actio… #93

Merge pull request #39 from prplecake/dependabot/github_actions/actio…

Merge pull request #39 from prplecake/dependabot/github_actions/actio… #93

Workflow file for this run

name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
checks: write
packages: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
source-url: https://nuget.pkg.github.com/prplecake/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal --logger "trx" --results-directory "./TestResults" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[BunnyDDNS.*.Tests?]*"
- uses: dorny/test-reporter@v1
if: always()
with:
name: .NET Test Results
path: TestResults/*.trx
reporter: dotnet-trx
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3