|
| 1 | +name: PostgreSQL and Vault verification |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + |
| 6 | +permissions: |
| 7 | + contents: read |
| 8 | + |
| 9 | +jobs: |
| 10 | + real-dependencies: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + timeout-minutes: 25 |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v7 |
| 15 | + - uses: actions/setup-java@v6 |
| 16 | + with: |
| 17 | + distribution: temurin |
| 18 | + java-version: '25' |
| 19 | + cache: maven |
| 20 | + - name: PostgreSQL migrations and competing transactions |
| 21 | + run: >- |
| 22 | + ./mvnw -B -ntp -pl payguard-identity-service,payguard-loan-service,payguard-collateral-service -am |
| 23 | + -Dtest=PostgreSqlTlsTest,PostgresqlMigrationRehearsalTest,SanitizedDependencyErrorTest,OtpInfrastructureIntegrationTest,OtpApplicationContractsTest,LoanServiceApplicationTests,CollateralServiceApplicationTests |
| 24 | + -Dsurefire.failIfNoSpecifiedTests=false clean test |
| 25 | + - name: Build protected migration and integration runners |
| 26 | + run: >- |
| 27 | + ./mvnw -B -ntp -pl payguard-identity-service,payguard-wallet-service,payguard-loan-service,payguard-collateral-service -am -DskipTests package dependency:copy-dependencies -DincludeScope=test |
| 28 | + - name: Verify synthetic export and approved identifier mapping |
| 29 | + run: python3 -m unittest discover -s scripts/migration -p 'test_*.py' |
| 30 | + - name: Prepare isolated TLS infrastructure |
| 31 | + run: | |
| 32 | + python3 scripts/local/prepare.py |
| 33 | + docker compose --env-file .env.example up -d --wait postgres-wallet postgres-loan postgres-collateral postgres-identity vault |
| 34 | + python3 scripts/local/vault_bootstrap.py |
| 35 | + - name: Apply separately privileged Flyway migrations |
| 36 | + run: | |
| 37 | + python3 scripts/local/migrate.py identity |
| 38 | + python3 scripts/local/migrate.py loan |
| 39 | + python3 scripts/local/migrate.py collateral |
| 40 | + - name: Verify actual pools, scoped secrets and Vault audit |
| 41 | + run: python3 scripts/local/verify_vault.py |
| 42 | + - name: Boot actual packaged services with scoped credentials |
| 43 | + run: python3 scripts/local/verify_applications.py |
| 44 | + - name: Preserve test reports |
| 45 | + if: always() |
| 46 | + uses: actions/upload-artifact@v7 |
| 47 | + with: |
| 48 | + name: database-security-reports |
| 49 | + path: | |
| 50 | + **/target/surefire-reports/TEST-*.xml |
| 51 | + payguard-shared/target/vault-test-reports/*.xml |
| 52 | + if-no-files-found: warn |
| 53 | + - name: Stop isolated infrastructure |
| 54 | + if: always() |
| 55 | + run: docker compose --env-file .env.example stop |
0 commit comments