NHibernate Integration Tests #169
This file contains hidden or 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: NHibernate Integration Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write # This is required for requesting the JWT | |
| contents: read # This is required for actions/checkout | |
| jobs: | |
| run-integration-tests: | |
| name: Run NHibernate Integration Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| dbEngine: ["mysql", "pg"] | |
| deployment: ["aurora", "multi-az-cluster", "multi-az-instance", "aurora-limitless"] | |
| steps: | |
| - name: 'Clone repository' | |
| uses: actions/checkout@v4 | |
| - name: "Set up JDK 8" | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "corretto" | |
| java-version: 8 | |
| - name: Setup .NET 8.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.407' | |
| - name: Configure AWS Credentials | |
| id: creds | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_DEPLOY_ROLE }} | |
| role-session-name: dotnet_nhibernate_integration_test | |
| role-duration-seconds: 21600 | |
| aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | |
| output-credentials: true | |
| - name: Run NHibernate Integration Tests | |
| run: | | |
| cd test/integration/host && ./gradlew --no-parallel --no-daemon test-all-${{ matrix.dbEngine }}-${{ matrix.deployment }}-nh --info | |
| env: | |
| RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
| AWS_ACCESS_KEY_ID: ${{ steps.creds.outputs.aws-access-key-id }} | |
| AWS_SECRET_ACCESS_KEY: ${{ steps.creds.outputs.aws-secret-access-key }} | |
| AWS_SESSION_TOKEN: ${{ steps.creds.outputs.aws-session-token }} | |
| AWS_RDS_MONITORING_ROLE_ARN: ${{ secrets.AWS_RDS_MONITORING_ROLE_ARN }} | |
| MYSQL_VERSION: "default" | |
| PG_VERSION: "default" | |
| - name: Archive results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nhibernate-integration-report-${{ matrix.dbEngine }}-${{ matrix.deployment }} | |
| path: ./test/integration/container/reports | |
| retention-days: 5 | |
| - name: Get Github Action IP | |
| if: always() | |
| id: ip | |
| uses: haythem/public-ip@v1.3 | |
| - name: Remove Github Action IP | |
| if: always() | |
| run: | | |
| aws ec2 revoke-security-group-ingress --group-name default --protocol all --port 0-65535 --cidr ${{ steps.ip.outputs.ipv4 }}/32 |