Test why GHA takes so long for tests #145
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: Build and Test | |
on: | |
push: | |
branches: [ "main" ] | |
paths-ignore: | |
- 'doc/**' | |
- 'README.md' | |
pull_request: | |
branches: [ "main" ] | |
paths-ignore: | |
- 'doc/**' | |
- 'README.md' | |
jobs: | |
build: | |
env: | |
TEST_ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/test | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
include: | |
- os: windows-latest | |
artifact: windows.complog | |
- os: ubuntu-latest | |
artifact: ubuntu.complog | |
name: Build and Test ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
6.4.x | |
7.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore -bl | |
- name: Test Linux | |
run: dotnet test --no-build --framework net7.0 --logger "console;verbosity=detailed" | |
if: matrix.os == 'ubuntu-latest' | |
- name: Test Windows | |
run: dotnet test --no-build --logger "console;verbosity=detailed" | |
# if: matrix.os == 'windows-latest' | |
if: false | |
- name: Create Compiler Log | |
run: dotnet run --project src/Basic.CompilerLog/Basic.CompilerLog.csproj create msbuild.binlog | |
- name: Publish Compiler Log | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.artifact }} | |
path: msbuild.complog | |
- name: Publish Test Artifacts | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: Test Artifacts ${{ matrix.os }} | |
path: ${{ github.workspace }}/artifacts/test | |