Merge branch 'main' of https://github.com/italia/pdnd-client-assertio… #14
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 a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
# Restore dependencies for the main project | |
- name: Restore dependencies for PDNDClientAssertionGenerator | |
run: dotnet restore src/PDNDClientAssertionGenerator/PDNDClientAssertionGenerator.csproj | |
# Restore dependencies for the test project | |
- name: Restore dependencies for PDNDClientAssertionGenerator.Tests | |
run: dotnet restore src/PDNDClientAssertionGenerator.Tests/PDNDClientAssertionGenerator.Tests.csproj | |
# Build the main project | |
- name: Build PDNDClientAssertionGenerator | |
run: dotnet build src/PDNDClientAssertionGenerator/PDNDClientAssertionGenerator.csproj --no-restore --configuration Release | |
# Build the test project | |
- name: Build PDNDClientAssertionGenerator.Tests | |
run: dotnet build src/PDNDClientAssertionGenerator.Tests/PDNDClientAssertionGenerator.Tests.csproj --no-restore --configuration Release | |
# Run the tests | |
- name: Run tests | |
run: dotnet test src/PDNDClientAssertionGenerator.Tests/PDNDClientAssertionGenerator.Tests.csproj --no-build --verbosity normal | |
continue-on-error: true # Optional: allows workflow to continue even if tests fail, but mark the job as failed |