Continuous Integration #6
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: Continuous Integration | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- release | |
- 'v3' | |
pull_request: | |
env: | |
DOTNET_NOLOGO: true # Disable the .NET logo | |
DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry | |
jobs: | |
build-windows: | |
name: Windows Build | |
runs-on: windows-latest | |
steps: | |
- name: ⤵️ Checkout Source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 🛠️ Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: 🛠️ Install dotnet tools | |
run: dotnet tool restore | |
- name: 🔨 Build and Test | |
run: dotnet tool run dotnet-cake --target=Test --test-run-name=Windows --configuration=Release | |
- name: 🔨 Windows Specific Tests | |
run: dotnet test --no-build --configuration=Release src/NUnitFramework/windows-tests/windows-tests.csproj | |
- name: 📦 Package | |
run: dotnet tool run dotnet-cake --target=Package | |
- name: 💾 Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Package | |
path: package | |
- name: 💾 Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test results (Windows) | |
path: test-results | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
build-linux: | |
name: Linux Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⤵️ Checkout Source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 🛠️ Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: 🛠️ Install F# | |
run: sudo apt-get install fsharp | |
- name: 🛠️ Install dotnet tools | |
run: dotnet tool restore | |
- name: 🔨 Build and Test | |
run: dotnet tool run dotnet-cake --target=Test --test-run-name=Linux --configuration=Release | |
- name: 💾 Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test results (Linux) | |
path: test-results | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
build-macos: | |
name: MacOS Build | |
runs-on: macos-14 | |
steps: | |
- name: ⤵️ Checkout Source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 🛠️ Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
dotnet-version: 6.x | |
- name: 🛠️ Install dotnet tools | |
run: dotnet tool restore | |
- name: 🔨 Build and Test | |
run: dotnet tool run dotnet-cake --target=Test --test-run-name=Linux --configuration=Release | |
- name: 💾 Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test results (macOS) | |
path: test-results | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} |