feat: scale-to-zero NAT instances for AWS #14
Workflow file for this run
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: Integration Tests | |
| on: | |
| pull_request: | |
| types: [labeled] | |
| workflow_dispatch: | |
| concurrency: | |
| group: nat-zero-integration | |
| cancel-in-progress: false | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| integration-test: | |
| if: >- | |
| github.event_name == 'workflow_dispatch' || | |
| github.event.label.name == 'integration-test' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| environment: integration | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 | |
| with: | |
| go-version-file: cmd/lambda/go.mod | |
| - uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3 | |
| with: | |
| terraform_wrapper: false | |
| - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4 | |
| with: | |
| role-to-assume: ${{ secrets.INTEGRATION_ROLE_ARN }} | |
| aws-region: us-east-1 | |
| - name: Build Lambda binary | |
| working-directory: cmd/lambda | |
| run: | | |
| GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -tags lambda.norpc -ldflags='-s -w' -o bootstrap | |
| zip lambda.zip bootstrap | |
| mkdir -p ../../.build | |
| cp lambda.zip ../../.build/lambda.zip | |
| - name: Test | |
| working-directory: tests/integration | |
| run: go test -v -timeout 10m -count=1 |