#54 - add ReturnAnalyzer service to DI #943
Workflow file for this run
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: Develop Workflow | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'release' | |
| pull_request: | |
| branches-ignore: | |
| - 'release' | |
| permissions: | |
| actions: write | |
| checks: write | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| build-and-test: | |
| name: Build & Test | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Setup GitVersion | |
| uses: gittools/actions/gitversion/setup@v4.2.0 | |
| with: | |
| versionSpec: '6.4.x' | |
| - name: Determine Version | |
| id: version_step | |
| uses: gittools/actions/gitversion/execute@v4.2.0 | |
| - name: Push New Version Tag | |
| if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
| run: | | |
| $gv = 'v${{ steps.version_step.outputs.majorMinorPatch }}' #gitversion result | |
| $lt = $( git describe --tags --abbrev=0 ) # last tag version result | |
| if ( -Not ( $gv -eq $lt ) ) | |
| { | |
| git tag $gv | |
| git push origin --tags | |
| } | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build /p:Version=${{ steps.version_step.outputs.fullSemVer }} --no-restore -c Debug -v n | |
| - name: Unit Tests | |
| run: dotnet test -c Debug --no-build -v n -- --filter-trait Category=Unit --ignore-exit-code 8 | |
| - name: Integration Tests | |
| run: | | |
| dotnet test tests/HydraScript.IntegrationTests -c Debug --no-build -v n -- --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml | |
| mkdir coverage-report | |
| - name: Code Coverage Summary Report For Merge Request | |
| if: github.event_name == 'pull_request' | |
| uses: 5monkeys/cobertura-action@master | |
| with: | |
| path: ./tests/HydraScript.IntegrationTests/bin/Debug/net9.0/TestResults/coverage.cobertura.xml | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| minimum_coverage: 80 | |
| fail_below_threshold: true | |
| show_class_names: true | |
| show_missing: true | |
| link_missing_lines: true | |
| show_branch: true | |
| only_changed_files: true | |
| - name: ReportGenerator | |
| uses: danielpalme/ReportGenerator-GitHub-Action@5.4.15 | |
| with: | |
| reports: './tests/HydraScript.IntegrationTests/bin/Debug/net9.0/TestResults/coverage.cobertura.xml' | |
| targetdir: './coverage-report' | |
| - name: Upload coverage report artifact | |
| if: github.event_name == 'push' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: CoverageReport | |
| path: coverage-report | |
| - name: Upload Windows Build | |
| if: github.ref != 'refs/heads/master' && github.event_name == 'push' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows_build_${{ steps.version_step.outputs.fullSemVer }} | |
| path: ./src/HydraScript/bin/Debug/net9.0 |