Update dependencies #17
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: .NET | |
| on: | |
| push: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| env: | |
| ProjectName: Gandi | |
| runs-on: windows-latest | |
| steps: | |
| - name: Unfuck Git | |
| run: git config set --global core.autocrlf false | |
| - name: Clone | |
| uses: actions/checkout@v6 | |
| - name: Initialize test reporting | |
| uses: testspace-com/setup-testspace@v1 | |
| with: | |
| domain: ${{github.repository_owner}} | |
| - name: Restore | |
| run: dotnet restore ${{ env.ProjectName }} | |
| - name: Build | |
| run: dotnet build ${{ env.ProjectName }} --no-restore --configuration Release | |
| - name: Pack | |
| run: dotnet pack ${{ env.ProjectName }} --no-build --configuration Release | |
| - name: Test | |
| run: | | |
| dotnet test Tests --configuration Release --collect:"XPlat Code Coverage" --settings Tests/Tests.runsettings --logger "trx;LogFileName=TestResults.xml" | |
| Out-File -InputObject "TEST_EXIT_CODE=$LASTEXITCODE" -FilePath $env:GITHUB_ENV -Append -Encoding UTF8 | |
| Copy-Item Tests/TestResults/*/coverage.info Tests/TestResults -ErrorAction Continue | |
| exit 0 | |
| - name: Upload test report | |
| run: testspace Tests/TestResults/*.xml | |
| - name: Upload coverage | |
| uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| files: Tests/TestResults/coverage.info | |
| format: lcov | |
| - name: Stop if tests failed | |
| run: exit $env:TEST_EXIT_CODE | |
| - name: Upload package | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ env.ProjectName }}.nupkg | |
| path: ${{ env.ProjectName }}/bin/Release/*.*nupkg | |
| if-no-files-found: error |