Merge pull request #136 from kolappannathan/dependabot/nuget/src/WebA… #66
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: CD | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- '.github/**' | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.2 | |
with: | |
fetch-depth: 0 # For the vs-intellicode action (https://github.com/microsoft/vs-intellicode#usage) | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v3.0.3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Install dependencies | |
run: | | |
cd ./src/WebApiBolierplate | |
dotnet restore | |
- name: Build | |
run: | | |
cd ./src/WebApiBolierplate | |
dotnet build --configuration Release --no-restore | |
- name: Test | |
run: | | |
cd ./src/WebApiBolierplate | |
dotnet test ./Core.Test/Core.Test.csproj | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.2 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Install dependencies | |
run: | | |
cd ./src/WebApiBolierplate | |
dotnet restore | |
- name: Build | |
run: | | |
cd ./src/WebApiBolierplate | |
dotnet build --configuration Release --no-restore | |
- name: Test | |
run: | | |
cd ./src/WebApiBolierplate | |
dotnet test ./Core.Test/Core.Test.csproj |