Repository navigation
One issue template, and the labels that are left are the ones in use #2500
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: 'C# Test' | |
| # No path filters, on purpose: this is the suite, and every change is one it can break. | |
| # That also means it cannot carry the defect that silenced the benchmark for ninety-eight | |
| # merged PRs -- a leading "./" in a path filter matches nothing, because filters are globs | |
| # relative to the repository root. Check that before adding any filter here. | |
| # https://github.com/asc-community/AngouriMath/issues/775 | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - '*' | |
| jobs: | |
| Test: | |
| strategy: | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: 'recursive' | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.x' | |
| dotnet-quality: 'preview' | |
| - name: Build Tests # We need it to be able to retry | |
| run: | | |
| dotnet add "Sources/Tests/UnitTests" package GitHubActionsTestLogger | |
| dotnet build Sources/Tests/UnitTests | |
| - name: Test if not to send | |
| if: ${{ matrix.os != 'windows-latest' }} | |
| run: | | |
| dotnet test "Sources/Tests/UnitTests" -c Release -l GitHubActions /p:CollectCoverage=true /p:CoverletOutputFormat=opencover | |
| - name: Test if to send | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: | | |
| cd Sources/Tests/UnitTests | |
| dotnet test --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | |
| cd ../../Utils/Utils | |
| dotnet run CopyCovReport | |
| - name: Info about the coverage report | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: dir ./Sources/Tests/UnitTests/coverage.opencover.xml | |
| - name: 'Upload report as artifact' | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Report | |
| path: ./Sources/Tests/UnitTests/coverage.opencover.xml | |
| retention-days: 3 | |
| # The corpus gate reports solved / unsolved / wrong / error / timeout rather than pass or | |
| # fail, and until now those numbers existed only in this job's log, which expires. This is | |
| # the artefact half of https://github.com/asc-community/AngouriMath/issues/746 item 36; the | |
| # per-commit history half is Sources/Tests/UnitTests/Corpus/corpus-baseline.tsv, which is | |
| # committed, because an artefact cannot be diffed, cannot be attributed to the commit that | |
| # moved a number, and expires. | |
| # | |
| # if: always() because a suite that fell over part way still measured the cases that ran, | |
| # and those are the interesting ones when something has just broken. Uploaded from every | |
| # operating system in the matrix: a verdict that differs between them is a finding. | |
| # | |
| # The glob spans bin/Debug and bin/Release because the two test steps above do not agree on | |
| # the configuration -- the Windows one takes the default. | |
| - name: 'Retain the corpus results' | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: corpus-report-${{ matrix.os }}-${{ github.sha }} | |
| path: Sources/Tests/UnitTests/bin/**/corpus-report.tsv | |
| if-no-files-found: warn | |
| retention-days: 90 | |
| # `files`, not `file`. v5 of the action does not take `file`: it warns about an unexpected | |
| # input, ignores the path, and searches the workspace instead, so the named report was never | |
| # what made this flag. | |
| - name: 'Send to codecov' | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./Sources/Tests/UnitTests/coverage.opencover.xml | |
| flags: csharp |