-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
715 additions
and
350 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Run Integration Tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
release_version: | ||
type: string | ||
description: 'Release version' | ||
required: true | ||
s3_bucket_prefix: | ||
type: string | ||
description: 'Bucket prefix for SAM assets' | ||
required: true | ||
aws_region: | ||
type: string | ||
description: 'AWS region to run tests in' | ||
default: 'us-west-2' | ||
workflow_dispatch: | ||
inputs: | ||
release_version: | ||
type: string | ||
description: 'Release version' | ||
required: true | ||
s3_bucket_prefix: | ||
type: string | ||
description: 'Bucket prefix for SAM assets' | ||
required: true | ||
aws_region: | ||
type: string | ||
description: 'AWS region to run tests in' | ||
default: 'us-west-2' | ||
|
||
env: | ||
AWS_REGION: "${{ inputs.aws_region }}" | ||
SAM_CLI_TELEMETRY: 0 | ||
|
||
jobs: | ||
provision: | ||
name: Provision DCE for tests | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tests: ${{ steps.find_hcl_files.outputs.tests }} | ||
steps: | ||
- name: DCE Provision | ||
uses: observeinc/github-action-dce@1.0.1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
budget-amount: ${{ vars.BUDGET_AMOUNT }} | ||
budget-currency: 'USD' | ||
expiry: '30m' | ||
email: 'joao+gha@observeinc.com' | ||
|
||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup test matrix | ||
id: find_hcl_files | ||
run: | | ||
echo "tests=$(ls integration/tests | awk -F. '{print $1}' | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT | ||
tests: | ||
name: Run integration test | ||
runs-on: ubuntu-latest | ||
needs: provision | ||
strategy: | ||
matrix: | ||
testfile: ${{fromJson(needs.provision.outputs.tests)}} | ||
steps: | ||
- name: DCE Use | ||
uses: observeinc/github-action-dce@1.0.1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
|
||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Pull SAM manifests | ||
run: | | ||
make sam-pull-${AWS_REGION} | ||
env: | ||
S3_BUCKET_PREFIX: "${{ inputs.s3_bucket_prefix }}" | ||
RELEASE_VERSION: "${{ inputs.release_version }}" | ||
|
||
- name: Run ${{ matrix.testfile }} integration test | ||
run: TEST_ARGS='-verbose' make test-integration-${{ matrix.testfile }} | ||
|
||
cleanup: | ||
name: Cleanup | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
if: always() | ||
steps: | ||
- name: DCE Cleanup | ||
if: needs.permission_check.outputs.can-write == 'true' | ||
uses: observeinc/github-action-dce@1.0.1 | ||
with: | ||
action-type: 'decommission' | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Push | ||
|
||
on: | ||
#push: | ||
#branches: | ||
#- main | ||
#pull_request: | ||
|
||
jobs: | ||
tests: | ||
name: Run tests | ||
uses: ./.github/workflows/tests.yaml | ||
secrets: inherit | ||
|
||
upload: | ||
name: Upload SAM assets | ||
needs: tests | ||
uses: ./.github/workflows/upload.yaml | ||
permissions: | ||
id-token: write | ||
secrets: inherit | ||
with: | ||
s3_bucket_prefix: "observeinc-" | ||
|
||
integration: | ||
name: Run integration tests | ||
if: ${{ !inputs.skip_integration_tests }} | ||
needs: upload | ||
uses: ./.github/workflows/integration.yaml | ||
secrets: inherit | ||
with: | ||
s3_bucket_prefix: "observeinc-" | ||
release_version: ${{ needs.upload.outputs.release_version }} |
This file contains 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
Oops, something went wrong.