Skip to content

Commit

Permalink
update github actions build
Browse files Browse the repository at this point in the history
  • Loading branch information
manigandham committed Mar 27, 2023
1 parent 205f1c8 commit 5780a28
Showing 1 changed file with 25 additions and 34 deletions.
59 changes: 25 additions & 34 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,34 @@
name: Build

on:
push:
pull_request:
branches: [ main ]
paths:
- '**.cs'
- '**.csproj'

env:
DOTNET_VERSION: '6.0.x' # The .NET SDK version to use
push:
pull_request:
branches: [main]
paths:
- '**.cs'
- '**.csproj'

jobs:
build-and-test:
build-and-test:
name: build-and-test-${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
dotnet-version: ['7.0.x']
os: [windows-latest]

name: build-and-test-${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v3
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}

steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore

- name: Setup .NET 5
uses: actions/setup-dotnet@v2
with:
dotnet-version: 5.0.x
- name: Build
run: dotnet build --configuration Release --no-restore

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --no-restore --verbosity normal

- name: Test
run: dotnet test --no-restore --verbosity normal

0 comments on commit 5780a28

Please sign in to comment.