Skip to content

Add Docker Integration tests for JavaScript, .NET, and Python #25

Add Docker Integration tests for JavaScript, .NET, and Python

Add Docker Integration tests for JavaScript, .NET, and Python #25

Workflow file for this run

name: PR .NET Checks
on:
pull_request:
branches: [ main ]
paths:
- 'dotnet/**'
- '.github/workflows/pr-dotnet.yml'
jobs:
dotnet-quality:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['8.0', '9.0']
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
working-directory: dotnet
run: dotnet restore
- name: Build
working-directory: dotnet
run: dotnet build --no-restore --configuration Release
- name: Format check
if: runner.os != 'Linux'
working-directory: dotnet
run: dotnet format --verify-no-changes --verbosity diagnostic
- name: Test
if: ${{ always() }}
working-directory: dotnet
run: dotnet test tests/Azure/Data/Postgresql/Npgsql/Azure.Data.Postgresql.Npgsql.Tests.csproj --configuration Release --logger trx --results-directory TestResults
- name: Pack
working-directory: dotnet
run: dotnet pack --no-build --configuration Release --output nupkgs
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.dotnet-version }}
path: dotnet/TestResults/*.trx
- name: Upload packages
if: matrix.dotnet-version == '8.0' # Only upload once
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: dotnet/nupkgs/*.nupkg