fix coverage stuff #5
This file contains hidden or 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 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: build_${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| permissions: | |
| contents: read | |
| attestations: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 9.0.x | |
| - name: Define VERSION | |
| run: | | |
| echo "COMMIT=${GITHUB_SHA:0:7}" | |
| echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" | |
| echo "BRANCH=${GITHUB_REF##*/}" | |
| - name: Prebuild | |
| run: | | |
| dotnet build -c Debug || : | |
| - name: Build (Debug) | |
| run: dotnet build -c Debug | |
| - name: Test (Debug) | |
| run: dotnet test -c Debug --no-build --collect "Code Coverage;Format=opencover" | |
| - name: Build (Release) | |
| run: dotnet build -c Release | |
| - name: Test (Release) | |
| run: dotnet test -c Release --no-build --collect "Code Coverage;Format=opencover" | |
| - name: Upload Codecov | |
| uses: codecov/codecov-action@v4.0.1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |