Skip to content

00060 implement backend for a to do list Pt. 1 #118

00060 implement backend for a to do list Pt. 1

00060 implement backend for a to do list Pt. 1 #118

name: Build and test - backend
on:
push:
paths:
- "**.cs"
- "**.csproj"
pull_request:
branches: [master]
paths:
- "**.cs"
- "**.csproj"
env:
DOTNET_VERSION: "7.0" # The .NET SDK version to use
jobs:
build-and-test-backend:
name: build-and-test-${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
working-directory: ./backend
run: dotnet restore
- name: Check licenses
working-directory: ./backend
run: |
dotnet tool install --global dotnet-project-licenses --version 2.7.1
dotnet-project-licenses -i src --allowed-license-types allowed-licenses.json
- name: Build
working-directory: ./backend
run: dotnet build --configuration Release --no-restore
- name: Test
working-directory: ./backend
run: dotnet test --no-restore --verbosity normal