fix(cloudformation): keep CloudFront CustomErrorResponses through provisioning #3
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: Examples | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| outputs: | |
| code: ${{ steps.detect.outputs.code || 'true' }} | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - if: github.event_name == 'pull_request' | |
| id: detect | |
| uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 | |
| with: | |
| predicate-quantifier: 'every' | |
| filters: | | |
| code: | |
| - '**' | |
| - '!**/*.md' | |
| - '!**/*.txt' | |
| - '!**/*.html' | |
| - '!docs/**' | |
| - '!website/**' | |
| - '!LICENSE' | |
| - '!.gitignore' | |
| examples: | |
| needs: changes | |
| if: needs.changes.outputs.code == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| - name: Build server | |
| run: cargo build --bin fakecloud | |
| - name: Start FakeCloud | |
| run: | | |
| cargo run --bin fakecloud & | |
| for i in $(seq 1 30); do | |
| curl -sf http://localhost:4566/_fakecloud/health && exit 0 | |
| sleep 1 | |
| done | |
| echo "FakeCloud failed to start" | |
| exit 1 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.12" | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: "20" | |
| - name: Run Python demo | |
| run: | | |
| pip install boto3 | |
| python examples/python/demo.py | |
| - name: Run Node demo | |
| run: | | |
| for i in 1 2 3; do | |
| npm install @aws-sdk/client-sqs @aws-sdk/client-sns @aws-sdk/client-ssm @aws-sdk/client-s3 @aws-sdk/client-dynamodb @aws-sdk/client-lambda @aws-sdk/client-secrets-manager @aws-sdk/client-cloudwatch-logs @aws-sdk/client-kms && ok=1 && break | |
| echo "npm install attempt $i failed; retrying"; sleep $((i * 5)) | |
| done | |
| [ "${ok:-}" = 1 ] || { echo "npm install failed after 3 attempts"; exit 1; } | |
| node examples/node/demo.js | |
| - name: Run sample app | |
| run: python examples/sample-app/app.py | |
| - uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1 | |
| - name: Run Terraform example | |
| working-directory: examples/terraform | |
| run: | | |
| rm -rf .terraform .terraform.lock.hcl terraform.tfstate* | |
| terraform init | |
| terraform apply -auto-approve | |
| terraform destroy -auto-approve |