feat(sdk): configure Lambda client timeouts #689
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: | |
| push: | |
| branches: ["main", "development"] | |
| paths: | |
| - "packages/aws-durable-execution-**" | |
| - "packages/client-lambda/**" | |
| - ".github/workflows/integration-tests.yml" | |
| - ".github/workflows/scripts/integration-test/**" | |
| - ".github/model/**" | |
| pull_request: | |
| branches: ["main", "development"] | |
| paths: | |
| - "packages/aws-durable-execution-**" | |
| - "packages/client-lambda/**" | |
| - ".github/workflows/integration-tests.yml" | |
| - ".github/workflows/scripts/integration-test/**" | |
| - ".github/model/**" | |
| workflow_dispatch: | |
| env: | |
| AWS_REGION: ${{ vars.AWS_REGION }} | |
| # permission can be added at job level or workflow level | |
| permissions: | |
| id-token: write # This is required for requesting the JWT | |
| contents: read # This is required for actions/checkout | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| function-name-map: ${{ steps.deploy-functions.outputs.function-name-map }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| cache: "npm" | |
| - name: Configure AWS credentials (OIDC for main workflow) | |
| if: github.event_name != 'workflow_dispatch' || github.actor != 'nektos/act' | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: "${{ secrets.ACTIONS_INTEGRATION_ROLE_NAME }}" | |
| role-session-name: githubIntegrationTest | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Install custom Lambda model | |
| run: | | |
| aws configure add-model --service-model file://.github/model/lambda.json --service-name lambda | |
| - name: Install dependencies | |
| run: npm run install-all | |
| - name: Build project | |
| run: npm run build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: built-artifacts | |
| path: | | |
| packages/**/dist*/* | |
| package.json | |
| - name: Deploy functions | |
| env: | |
| AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | |
| LAMBDA_ENDPOINT: ${{ secrets.LAMBDA_ENDPOINT }} | |
| INVOKE_ACCOUNT_ID: ${{ secrets.INVOKE_ACCOUNT_ID_BETA }} | |
| KMS_KEY_ARN: ${{ secrets.KMS_KEY_ARN }} | |
| GITHUB_EVENT_NAME: ${{ github.event_name }} | |
| GITHUB_EVENT_NUMBER: ${{ github.event.number }} | |
| run: node .github/workflows/scripts/integration-test/integration-test.js --deploy-only | |
| jest-integration-test: | |
| needs: setup | |
| runs-on: ubuntu-latest | |
| name: Jest Integration Tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| cache: "npm" | |
| - name: Configure AWS credentials (OIDC for main workflow) | |
| if: github.event_name != 'workflow_dispatch' || github.actor != 'nektos/act' | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: "${{ secrets.ACTIONS_INTEGRATION_ROLE_NAME }}" | |
| role-session-name: githubIntegrationTest | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: built-artifacts | |
| path: . | |
| - name: Install dependencies | |
| run: | | |
| npm run install-all | |
| - name: Run Jest integration tests | |
| env: | |
| LAMBDA_ENDPOINT: ${{ secrets.LAMBDA_ENDPOINT }} | |
| FUNCTION_NAME_MAP: ${{ needs.setup.outputs.function-name-map }} | |
| GITHUB_EVENT_NAME: ${{ github.event_name }} | |
| GITHUB_EVENT_NUMBER: ${{ github.event.number }} | |
| AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | |
| run: | | |
| node .github/workflows/scripts/integration-test/integration-test.js --test-only | |
| cleanup: | |
| needs: [setup, jest-integration-test] | |
| runs-on: ubuntu-latest | |
| if: ${{ !failure() }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| cache: "npm" | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: built-artifacts | |
| path: . | |
| - name: Install dependencies | |
| run: | | |
| npm run install-all | |
| - name: Configure AWS credentials (OIDC for main workflow) | |
| if: github.event_name != 'workflow_dispatch' || github.actor != 'nektos/act' | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: "${{ secrets.ACTIONS_INTEGRATION_ROLE_NAME }}" | |
| role-session-name: githubIntegrationTest | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Cleanup Lambda functions | |
| env: | |
| LAMBDA_ENDPOINT: ${{ secrets.LAMBDA_ENDPOINT }} | |
| FUNCTION_NAME_MAP: ${{ needs.setup.outputs.function-name-map }} | |
| GITHUB_EVENT_NAME: ${{ github.event_name }} | |
| GITHUB_EVENT_NUMBER: ${{ github.event.number }} | |
| AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | |
| run: | | |
| node .github/workflows/scripts/integration-test/integration-test.js --cleanup-only |