Resolves #254 and #364 #298
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: .NET CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| build_and_test: | |
| name: Build & test | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| env: | |
| RunNumber: ${{ github.run_number }}.${{ github.run_attempt }} | |
| Configuration: Debug | |
| Tfm: net8.0 | |
| # Change selected factory to VerboseChrome to debug Chrome-related issues | |
| WebDriverFactory__SelectedConfiguration: CiHeadlessChrome | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - uses: ./.github/actions/setup-build-dependencies | |
| - uses: ./.github/actions/setup-test-dependencies | |
| - uses: ./.github/actions/restore-dependencies | |
| - uses: ./.github/actions/start-sonarscanner | |
| with: | |
| project: csf-dev_CSF.Screenplay | |
| build-version: GitHub_build_${{ env.RunNumber }} | |
| username: craigfowler-github | |
| secret-key: ${{ secrets.SONARCLOUDKEY }} | |
| js-coverage-path: CSF.Screenplay.JsonToHtmlReport.Template/src/TestResults/lcov.info | |
| - name: Build the solution | |
| run: dotnet build -c ${{ env.Configuration }} --no-incremental | |
| - id: run-all-tests | |
| uses: ./.github/actions/run-all-tests-with-coverage | |
| - name: Stop SonarScanner | |
| run: | |
| dotnet sonarscanner end /d:sonar.token=${{ secrets.SONARCLOUDKEY }} | |
| - name: Gracefully stop Xvfb | |
| run: killall Xvfb | |
| continue-on-error: true | |
| - uses: ./.github/actions/upload-ci-artifacts | |
| - name: Fail the build if any test failures | |
| if: steps.run-all-tests.outputs.failures == 'true' | |
| run: | | |
| echo "Failing the build due to test failures" | |
| exit 1 |