Better OTel and use Pull Diagnostics for tests #2744
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: Build and test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - nightly | |
| paths-ignore: | |
| - ".github" | |
| - ".vscode" | |
| pull_request: | |
| paths-ignore: | |
| - ".github" | |
| - ".vscode" | |
| jobs: | |
| build: | |
| env: | |
| TEST_TIMEOUT_MINUTES: 40 | |
| FSAC_TEST_DEFAULT_TIMEOUT : 120000 #ms, individual test timeouts | |
| DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 # needed to allow .NET RCs to participate in rollforward as expected. | |
| DOTNET_INSTALL_DIR: ".dotnet" | |
| timeout-minutes: 40 # we have a locking issue, so cap the runs at ~20m to account for varying build times, etc | |
| strategy: | |
| matrix: | |
| os: | |
| - windows-latest | |
| - macos-15 | |
| - ubuntu-latest | |
| dotnet-version: ["8.x", "9.x", "10.x"] | |
| use-transparent-compiler: | |
| - "TransparentCompiler" | |
| - "BackgroundCompiler" | |
| workspace-loader: | |
| - "WorkspaceLoader" | |
| # - "ProjectGraph" # this is disable because it just adds too much time to the build | |
| # these entries will mesh with the above combinations | |
| include: | |
| # latest 8.0 | |
| - global-json-file: "global.json" | |
| dotnet-version: "8.x" | |
| include-prerelease: false | |
| label: "8.0" | |
| build_net9: false | |
| build_net10: false | |
| test_tfm: net8.0 | |
| # latest 9.0 | |
| - global-json-file: "global.json" | |
| dotnet-version: "9.x" | |
| include-prerelease: true | |
| label: "9.0" | |
| build_net9: true | |
| build_net10: false | |
| test_tfm: net9.0 | |
| # latest 10.0 | |
| - global-json-file: "global.json" | |
| dotnet-version: "10.x" | |
| include-prerelease: true | |
| label: "10.0" | |
| build_net9: false | |
| build_net10: true | |
| test_tfm: net10.0 | |
| fail-fast: false # we have timing issues on some OS, so we want them all to run | |
| runs-on: ${{ matrix.os }} | |
| name: Build on ${{matrix.os}} for ${{ matrix.label }} ${{ matrix.workspace-loader }} ${{ matrix.use-transparent-compiler }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # setup .NET per the repo global.json | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| # setup .NET per test session | |
| - name: Setup .NET | |
| id : setup-dotnet | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| # remove global.json so that the env configuration takes precedence | |
| - name: Purge global.json | |
| run: rm global.json | |
| - name: Create global.json | |
| run: dotnet new globaljson --sdk-version '${{ steps.setup-dotnet.outputs.dotnet-version }}' --roll-forward latestMinor | |
| # let's make sure we're on the version we think we are. | |
| - name: Announce .NET version | |
| run: dotnet --info | |
| - name: Restore tools | |
| run: dotnet tool restore | |
| - name: Check format | |
| run: dotnet fantomas --check build.fsx src | |
| env: | |
| DOTNET_ROLL_FORWARD: LatestMajor | |
| DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 | |
| # Ensure the scaffolding code can still add items to the existing code. | |
| # - name: EnsureCanScaffoldCodeFix | |
| # run: dotnet fsi build.fsx -- -p EnsureCanScaffoldCodeFix | |
| - name: Run Build | |
| run: dotnet build -c Release | |
| env: | |
| BuildNet9: ${{ matrix.build_net9 }} | |
| BuildNet10: ${{ matrix.build_net10 }} | |
| - name: Run and report tests | |
| run: dotnet run -c Release -f ${{ matrix.test_tfm }} --no-build -- --fail-on-focused-tests --parallel | |
| working-directory: test/FsAutoComplete.Tests.Lsp | |
| env: | |
| BuildNet9: ${{ matrix.build_net9 }} | |
| BuildNet10: ${{ matrix.build_net10 }} | |
| USE_TRANSPARENT_COMPILER: ${{ matrix.use-transparent-compiler }} | |
| USE_WORKSPACE_LOADER: ${{ matrix.workspace-loader }} | |
| FAILED_TRACES_DIR: ${{ github.workspace }}/failed_traces | |
| - name: Upload failed test traces | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: failed-test-traces-${{ matrix.os }}-${{ matrix.label }}-${{ matrix.workspace-loader }}-${{ matrix.use-transparent-compiler }} | |
| path: failed_traces/ | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| analyze: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| - name: Restore tools | |
| run: dotnet tool restore | |
| - name: Run analyzers | |
| run: dotnet build -t:AnalyzeSolution -p:TargetFramework=net8.0 | |
| # SARIF v3 requires categories to be used per file and since | |
| # Github Actions doesn't know what a for loop is I'm just ignoring this for now. | |
| # Otherwise we have to generate a matrix and upload the files for the next job | |
| # to use. What a mess. | |
| # - name: Upload SARIF file | |
| # uses: github/codeql-action/upload-sarif@v2 | |
| # with: | |
| # sarif_file: analysisreports |