Write unused references to a log file #165
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: Build and Test | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Git Versioning requires a non-shallow clone | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
- name: Run vcvarsall.bat on Windows for MSVC testing | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Restore | |
run: dotnet restore -bl:logs/restore.binlog | |
- name: Build | |
run: dotnet build --configuration Release --no-restore -bl:logs/build.binlog | |
- name: Test | |
run: dotnet test --configuration Release --no-build --logger trx --results-directory TestResults --collect:"Code Coverage;Format=Cobertura" | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v4 | |
# with: | |
# directory: ./TestResults | |
# files: "*.cobertura.xml" | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results-${{ matrix.os }} | |
path: ./TestResults | |
if: ${{ always() }} # Always run this step even on failure | |
- name: Upload logs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-${{ matrix.os }} | |
path: ./logs | |
if: ${{ always() }} # Always run this step even on failure | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts-${{ matrix.os }} | |
path: ./artifacts | |
if: ${{ always() }} # Always run this step even on failure |