Skip to content

Update .NET example to include non-admin logic and separated auth (#132) #46

Update .NET example to include non-admin logic and separated auth (#132)

Update .NET example to include non-admin logic and separated auth (#132) #46

name: Dotnet Npgsql integration tests
on:
push:
branches: [ "main" ]
paths:
- 'dotnet/npgsql/**'
- '.github/workflows/dotnet-npgsql-integ-tests.yml'
pull_request:
branches: [ "main" ]
paths:
- 'dotnet/npgsql/**'
- '.github/workflows/dotnet-npgsql-integ-tests.yml'
# Give us a button to allow running the workflow on demand for testing.
workflow_dispatch:
inputs:
tags:
description: 'Manual Workflow Run'
required: false
type: string
jobs:
dotnet-npgsql-integ-test:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
# Explicitly set permissions, following the principle of least privilege
actions: read
checks: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.0.x'
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.DOTNET_IAM_ROLE }}
aws-region: us-east-1
- name: Configure and run integration for npgsql
working-directory: ./dotnet/npgsql
env:
CLUSTER_USER: "admin"
CLUSTER_ENDPOINT: ${{ secrets.DOTNET_NPGSQL_CLUSTER_ENDPOINT }}
REGION: ${{ secrets.DOTNET_NPGSQL_CLUSTER_REGION }}
run: |
dotnet run --framework net9.0