Return bad request as ValidationProblemDetails #112
Workflow file for this run
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: "PR Build and test" | |
on: | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
event_file: | |
name: "Event File" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Event File | |
path: ${{ github.event_path }} | |
build-and-test: | |
name: "Build and test" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dotnet: [ 'net6.0', 'net7.0' ] | |
env: | |
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages | |
TC_CLOUD_TOKEN: ${{ secrets.TC_TOKEN }} | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
dotnet-quality: 'preview' | |
# cache: true | |
# - | |
# name: Install dependencies | |
# run: dotnet restore --locked-mode | |
# run: dotnet restore | |
- | |
name: Build | |
run: | | |
dotnet build --configuration Debug -f ${{ matrix.dotnet }} | |
- | |
name: Prepare Testcontainers Cloud agent | |
if: env.TC_CLOUD_TOKEN != '' | |
uses: atomicjar/testcontainers-cloud-setup-action@main | |
- | |
name: Run tests | |
run: dotnet test --no-build -f ${{ matrix.dotnet }} | |
- | |
name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Test Results ${{ matrix.dotnet }} | |
path: | | |
test-results/**/*.xml | |
test-results/**/*.trx | |
test-results/**/*.json |