Skip to content

Add link to the Android app #495

Add link to the Android app

Add link to the Android app #495

Workflow file for this run

name: Build
on:
workflow_dispatch:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Build
id: build
run: dotnet build -warnaserror -p:TreatWarningsAsErrors=true -bl:build.binlog
- name: Incremental re-build
run: dotnet build -warnaserror -p:TreatWarningsAsErrors=true -question -bl:question.binlog
- name: Test
if: ${{ always() && steps.build.outcome == 'success' }}
run: dotnet test --no-build --report-trx
- name: Check BOM changes
if: always()
run: dnx bom check pr
- name: Upload Windows UnitTests binaries
if: ${{ matrix.os == 'windows-latest' && steps.build.outcome == 'success' }}
uses: actions/upload-artifact@v6
with:
name: windows-unit-tests
path: |
artifacts/bin/UnitTests/debug/
!artifacts/bin/UnitTests/debug/TestResults/**
if-no-files-found: error
- name: Upload logs
if: always()
uses: actions/upload-artifact@v6
with:
name: logs-${{ matrix.os }}
path: |
*.binlog
**/TestResults/*.*
# Verify it's possible to run tests in WSL (e.g., from Visual Studio),
# since some tests (e.g., TemplateCacheTests) are only enabled on Linux.
test-windows-built-unit-tests-on-linux:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Download Windows UnitTests binaries
uses: actions/download-artifact@v6
with:
name: windows-unit-tests
path: windows-unit-tests
- name: Test Windows-built UnitTests on Linux
run: dotnet windows-unit-tests/DotNetLab.UnitTests.dll --report-trx
- name: Upload logs
if: always()
uses: actions/upload-artifact@v6
with:
name: logs-windows-unit-tests-on-linux
path: |
**/TestResults/*.*
# When using dotnet-watch, we turn off toolset compilers,
# so make sure the project is buildable without them.
build-without-toolset-compilers:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Build
run: dotnet build -warnaserror -p:TreatWarningsAsErrors=true -p:DotNetLabUseCompilerToolset=false -bl
- name: Upload logs
if: always()
uses: actions/upload-artifact@v6
with:
name: logs-build-without-toolset-compilers
path: |
*.binlog