correct szarrayenumerator? #314
Workflow file for this run
This file contains 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: Test | |
on: [push, pull_request] | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
dotnet-version: ["2.1", "3.1", "7.0"] | |
steps: | |
- uses: actions/checkout@v3 | |
# Annoyingly, it seems like merely having different targets in our .csproj requires us to have all the SDKs available when doing setup | |
# This is pretty silly. | |
# But hey, at least it's fast. | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
2.1.x | |
3.1.x | |
7.0.x | |
- name: Build | |
# this seems to fail intermittently on 2.1 so now we're trying it repeatedly *which is terrible* but 2.1 is rapidly bitrotting | |
# my kingdom for unity updating its damn mono implementation | |
run: | | |
for i in {1..5}; do | |
dotnet build --configuration "Debug ${{ matrix.dotnet-version }}" && break | |
done | |
- name: Test | |
run: dotnet test -c "Debug ${{ matrix.dotnet-version }}" --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | |
- name: Upload coverage files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-${{ matrix.dotnet-version }} | |
path: test/*/TestResults | |
submit_coverage: | |
needs: build_and_test | |
runs-on: ubuntu-22.04 | |
steps: | |
# this appears to be needed for some part of the setup process; it's unclear why | |
- uses: actions/checkout@v3 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Setup tooling | |
run: dotnet tool install -g coveralls.net --version 4.0.1 | |
- name: Setup environment | |
run: dotnet restore | |
- name: Download all coverage files | |
uses: actions/download-artifact@v3 | |
- name: Combine and submit coverage data | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
run: | | |
coverage_files=$(find -name 'TestResults' -type d | xargs -I {} find {} -type f | sed s/^/opencover=/ | sed ':a;N;$!ba;s/\n/;/g') | |
csmacnz.Coveralls --useRelativePaths --multiple -i "$coverage_files" --serviceName github-ci --jobId $GITHUB_RUN_ID --commitId $(git rev-parse HEAD) --commitBranch "${GITHUB_REF:-none}" --commitAuthor "$(git log -1 --pretty=format:'%an')" --commitEmail "$(git log -1 --pretty=format:'%ae')" --commitMessage "$(git log -1 --pretty='%s')" --repoToken $COVERALLS_REPO_TOKEN || true | |
docs: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup 7.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Test documentation | |
run: | | |
sudo apt install nuget | |
nuget install docfx.console | |
docfx.console.*/tools/docfx.exe doc/docfx.json --warningsAsErrors | |