chore: upload code coverage to codecov #33
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: ci | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
NUGET_PACKAGES: '${{ github.workspace }}/.nuget/packages' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
with: | |
fetch-depth: 0 | |
- name: NuGet Cache | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
with: | |
path: | | |
${{ env.NUGET_PACKAGES }} | |
.nuke/temp | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/global.json', '**/*.csproj', '**/*.props') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Setup .NET | |
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4 | |
- name: Restore .NET Tools | |
run: | | |
dotnet tool restore | |
- name: Nuke | |
run: | | |
dotnet nuke | |
- name: Upload Coverage | |
uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: artifacts/coverage/ | |
fail_ci_if_error: true |