|
52 | 52 | GITHUB_EVENT_NAME: ${{ github.event_name }} |
53 | 53 | GITHUB_EVENT_NUMBER: ${{ github.event.number }} |
54 | 54 | AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} |
55 | | - CAPACITY_PROVIDER_ARN: ${{ secrets.CAPACITY_PROVIDER_ARN }} |
56 | 55 | run: node .github/workflows/scripts/integration-test/integration-test.js --deploy-only --runtime ${{ inputs.node-version }} |
57 | 56 |
|
58 | 57 | jest-integration-test: |
@@ -96,6 +95,133 @@ jobs: |
96 | 95 | LAMBDA_ENDPOINT: ${{ secrets.LAMBDA_ENDPOINT }} |
97 | 96 | GITHUB_EVENT_NAME: ${{ github.event_name }} |
98 | 97 | GITHUB_EVENT_NUMBER: ${{ github.event.number }} |
99 | | - CAPACITY_PROVIDER_ARN: ${{ secrets.CAPACITY_PROVIDER_ARN }} |
100 | 98 | run: | |
101 | 99 | node .github/workflows/scripts/integration-test/integration-test.js --test-only --runtime ${{ inputs.node-version }} |
| 100 | +
|
| 101 | + deploy-capacity-provider: |
| 102 | + permissions: |
| 103 | + contents: read |
| 104 | + id-token: write # Required for AWS credentials |
| 105 | + runs-on: ubuntu-latest |
| 106 | + steps: |
| 107 | + - uses: actions/checkout@v4 |
| 108 | + |
| 109 | + - name: Setup Node.js |
| 110 | + uses: actions/setup-node@v4 |
| 111 | + with: |
| 112 | + node-version: ${{ inputs.node-version }} |
| 113 | + cache: "npm" |
| 114 | + |
| 115 | + - name: Get AWS Credentials |
| 116 | + id: credentials |
| 117 | + if: github.actor != 'nektos/act' |
| 118 | + uses: aws-actions/configure-aws-credentials@v4 |
| 119 | + with: |
| 120 | + role-to-assume: "${{ secrets.ACTIONS_INTEGRATION_ROLE_NAME }}" |
| 121 | + role-session-name: githubIntegrationTest |
| 122 | + aws-region: ${{ vars.AWS_REGION }} |
| 123 | + |
| 124 | + - name: Download build artifacts |
| 125 | + uses: actions/download-artifact@v4 |
| 126 | + with: |
| 127 | + name: built-artifacts |
| 128 | + path: . |
| 129 | + |
| 130 | + - name: Install dependencies |
| 131 | + run: npm ci |
| 132 | + |
| 133 | + - name: Deploy all capacity provider functions |
| 134 | + id: deploy-capacity-providers |
| 135 | + env: |
| 136 | + LAMBDA_ENDPOINT: ${{ secrets.LAMBDA_ENDPOINT }} |
| 137 | + GITHUB_EVENT_NAME: ${{ github.event_name }} |
| 138 | + GITHUB_EVENT_NUMBER: ${{ github.event.number }} |
| 139 | + AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} |
| 140 | + CAPACITY_PROVIDER_ARN: ${{ secrets.CAPACITY_PROVIDER_ARN }} |
| 141 | + run: node .github/workflows/scripts/integration-test/integration-test.js --deploy-only --capacity-provider-only --runtime ${{ inputs.node-version }} |
| 142 | + |
| 143 | + test-capacity-provider: |
| 144 | + needs: deploy-capacity-provider |
| 145 | + runs-on: ubuntu-latest |
| 146 | + name: Test Capacity Provider Functions |
| 147 | + permissions: |
| 148 | + contents: read |
| 149 | + id-token: write # Required for AWS credentials |
| 150 | + |
| 151 | + steps: |
| 152 | + - uses: actions/checkout@v4 |
| 153 | + |
| 154 | + - name: Setup Node.js |
| 155 | + uses: actions/setup-node@v4 |
| 156 | + with: |
| 157 | + node-version: ${{ inputs.node-version }} |
| 158 | + cache: "npm" |
| 159 | + |
| 160 | + - name: Get AWS Credentials |
| 161 | + id: credentials |
| 162 | + if: github.actor != 'nektos/act' |
| 163 | + uses: aws-actions/configure-aws-credentials@v4 |
| 164 | + with: |
| 165 | + role-to-assume: "${{ secrets.ACTIONS_INTEGRATION_ROLE_NAME }}" |
| 166 | + role-session-name: githubIntegrationTest |
| 167 | + aws-region: ${{ vars.AWS_REGION }} |
| 168 | + |
| 169 | + - name: Download build artifacts |
| 170 | + uses: actions/download-artifact@v4 |
| 171 | + with: |
| 172 | + name: built-artifacts |
| 173 | + path: . |
| 174 | + |
| 175 | + - name: Install dependencies |
| 176 | + run: npm ci |
| 177 | + |
| 178 | + - name: Test all capacity provider functions |
| 179 | + env: |
| 180 | + LAMBDA_ENDPOINT: ${{ secrets.LAMBDA_ENDPOINT }} |
| 181 | + GITHUB_EVENT_NAME: ${{ github.event_name }} |
| 182 | + GITHUB_EVENT_NUMBER: ${{ github.event.number }} |
| 183 | + run: | |
| 184 | + node .github/workflows/scripts/integration-test/integration-test.js --test-only --capacity-provider-only --runtime ${{ inputs.node-version }} |
| 185 | + cleanup-capacity-provider: |
| 186 | + if: always() |
| 187 | + needs: test-capacity-provider |
| 188 | + runs-on: ubuntu-latest |
| 189 | + name: Clean up capacity provider functions |
| 190 | + permissions: |
| 191 | + contents: read |
| 192 | + id-token: write # Required for AWS credentials |
| 193 | + |
| 194 | + steps: |
| 195 | + - uses: actions/checkout@v4 |
| 196 | + |
| 197 | + - name: Setup Node.js |
| 198 | + uses: actions/setup-node@v4 |
| 199 | + with: |
| 200 | + node-version: ${{ inputs.node-version }} |
| 201 | + cache: "npm" |
| 202 | + |
| 203 | + - name: Get AWS Credentials |
| 204 | + id: credentials |
| 205 | + if: github.actor != 'nektos/act' |
| 206 | + uses: aws-actions/configure-aws-credentials@v4 |
| 207 | + with: |
| 208 | + role-to-assume: "${{ secrets.ACTIONS_INTEGRATION_ROLE_NAME }}" |
| 209 | + role-session-name: githubIntegrationTest |
| 210 | + aws-region: ${{ vars.AWS_REGION }} |
| 211 | + |
| 212 | + - name: Download build artifacts |
| 213 | + uses: actions/download-artifact@v4 |
| 214 | + with: |
| 215 | + name: built-artifacts |
| 216 | + path: . |
| 217 | + |
| 218 | + - name: Install dependencies |
| 219 | + run: npm ci |
| 220 | + |
| 221 | + - name: Clean up capacity provider functions |
| 222 | + env: |
| 223 | + LAMBDA_ENDPOINT: ${{ secrets.LAMBDA_ENDPOINT }} |
| 224 | + GITHUB_EVENT_NAME: ${{ github.event_name }} |
| 225 | + GITHUB_EVENT_NUMBER: ${{ github.event.number }} |
| 226 | + run: | |
| 227 | + node .github/workflows/scripts/integration-test/integration-test.js --cleanup-only --capacity-provider-only --runtime ${{ inputs.node-version }} |
0 commit comments