From 8389343ccb83bc97519d104fcef1f0fdeaf4dc51 Mon Sep 17 00:00:00 2001 From: ikpil Date: Mon, 18 Sep 2023 23:10:20 +0900 Subject: [PATCH] feat: all platform --- .github/workflows/dotnet.yml | 42 ++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index da74b91..9ea4ed3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -5,24 +5,34 @@ name: .NET on: push: - branches: [ "main" ] pull_request: - branches: [ "main" ] + branches: [ main ] + paths: + - '**.cs' + - '**.csproj' + - '**.sln' jobs: - build: - - runs-on: ubuntu-latest + build-and-test: + name: build-and-test-${{matrix.os}} + runs-on: ${{ matrix.os }} + strategy: + matrix: + dotnet-version: [ '7.0.x' ] + os: [ windows-latest, ubuntu-latest, macos-latest ] steps: - - uses: actions/checkout@v3 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 7.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --no-restore - - name: Test - run: dotnet test --no-build --verbosity normal + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ matrix.dotnet-version }} + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --no-restore + + - name: Test + run: dotnet test --no-build --verbosity normal