ci(cloudsql-pg): add end to end integration test (#113)

End to end integration test for cloudsql postgres.

Include checks for one tool's get (manifest) and post (invoke) endpoint.

Integration tests are excluded from regular unit tests.
This commit is contained in:
Yuan
2024-12-12 13:56:04 -08:00
committed by GitHub
parent 6d19ff96e4
commit 7e8d751d3f
6 changed files with 412 additions and 23 deletions

View File

@@ -30,7 +30,7 @@ branchProtectionRules:
- "conventionalcommits.org"
- "header-check"
# - Add required status checks like presubmit tests
- "integration tests (ubuntu-latest)"
- "unit tests (ubuntu-latest)"
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: true

View File

@@ -28,7 +28,7 @@ jobs:
integration:
# run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
if: "${{ (github.event.action != 'labeled' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) || github.event.label.name == 'tests: run' }}"
name: integration tests
name: unit tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
@@ -76,4 +76,4 @@ jobs:
run: go build -v ./...
- name: Run tests
run: go test -race -v ./...
run: go test -race -tags="!integration" -v ./...