.NET #11
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 and test a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
backend-build-and-test: | |
name: Build and Test Backend | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore Backend Dependencies | |
run: dotnet restore CollectifyAPI/CollectifyAPI/CollectifyAPI.csproj | |
- name: Build Backend | |
run: dotnet build CollectifyAPI/CollectifyAPI/CollectifyAPI.csproj --no-restore | |
- name: Run Backend Tests | |
run: dotnet test CollectifyAPI/CollectifyAPI/CollectifyAPI.csproj --no-build --verbosity normal | |
- name: Restore Test Dependencies | |
run: dotnet restore CollectifyAPI.Tests/CollectifyAPI.Tests.csproj | |
- name: Run Unit and Integration Tests | |
run: dotnet test CollectifyAPI.Tests/CollectifyAPI.Tests.csproj --no-build --verbosity normal |