configure codecov #29
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Build and Test' | |
on: | |
push: | |
branches: [ '**' ] | |
pull_request: | |
branches: [ '**' ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build -c Release --no-restore | |
- name: Test and collect coverage | |
run: dotnet test -c Release --no-restore --no-build -v=normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencove | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload NoStringEvaluating nuget packages artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: service-nuget-packages | |
path: NoStringEvaluating/bin/Release/*.nupkg | |
retention-days: 1 | |
- name: Upload NoStringEvaluating.DI nuget packages artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: service-di-nuget-packages | |
path: NoStringEvaluating.Extensions.Microsoft.DependencyInjection/bin/Release/*.nupkg | |
retention-days: 1 | |