#172 - slnx migration #865
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@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Setup GitVersion | |
| uses: gittools/actions/gitversion/[email protected] | |
| with: | |
| versionSpec: '5.12.0' | |
| - name: Determine Version | |
| id: version_step | |
| uses: gittools/actions/gitversion/[email protected] | |
| with: | |
| useConfigFile: true | |
| - 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="Category=Unit" | |
| - name: Integration Tests | |
| run: | | |
| dotnet test -c Debug /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --no-build -v n --filter="Category=Integration" | |
| 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/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/[email protected] | |
| with: | |
| reports: './tests/HydraScript.IntegrationTests/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 |