CI #19
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
#os: [ubuntu-latest, windows-latest, macos-latest] | |
os: [windows-latest] | |
permissions: | |
checks: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Docker on macOS | |
if: matrix.os == 'macos-latest' | |
uses: douglascamata/setup-docker-macos-action@v1-alpha | |
# test prerequisites | |
# dotnet 6,7,8 | |
- name: Install .NET 6 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Install .NET 7 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Install .NET 8 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
# azure function sdk | |
- name: Install Azure Functions SDK | |
run: npm install -g azure-functions-core-tools@4 | |
# dapr | |
- name: Install Dapr SDK | |
if: matrix.os == 'ubuntu-latest' | |
run: wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bash | |
- name: Install Dapr SDK | |
if: matrix.os == 'macos-latest' | |
run: curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | /bin/bash | |
- name: Init Dapr | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
run: dapr init | |
- name: Install Dapr SDK | |
if: matrix.os == 'windows-latest' | |
shell: pwsh | |
run: iwr -useb https://raw.githubusercontent.com/dapr/cli/master/install/install.ps1 | iex | |
- name: Init Dapr | |
if: matrix.os == 'windows-latest' | |
run: c:\dapr init | |
- name: Restore | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet test --no-build --logger trx | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
job_summary: true | |
files: | | |
**/*.trx | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
if: matrix.os == 'windows-latest' || matrix.os == 'macos-latest' | |
with: | |
job_summary: true | |
files: | | |
**/*.trx |