chore(deps-dev): bump lerna-projen from 0.1.437 to 0.1.516 #826
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
name: Run E2E tests when PR labeled | |
on: | |
pull_request: | |
types: | |
- labeled | |
env: | |
LABEL_READY: e2e-ready | |
LABEL_TESTING: e2e-testing | |
LABEL_COMPLETED: e2e-completed | |
NODE_VERSION: 20 | |
AWS_REGION: eu-west-1 | |
jobs: | |
set-progress-label: | |
# Note: env is not available for the job level 'if', so hard coded value here | |
if: ${{ github.event.label.name == 'e2e-ready' }} | |
name: Set in-progress label | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
actions: read | |
steps: | |
- name: Assign label ${{ env.LABEL_TESTING }} | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
with: | |
script: | | |
github.rest.issues.removeLabel({...context.repo, issue_number: context.issue.number, name: '${{ env.LABEL_READY }}'}); | |
try { | |
await github.rest.issues.removeLabel({...context.repo, issue_number: context.issue.number, name: '${{ env.LABEL_COMPLETED }}'}); | |
} catch(e) { /* OK to fail, this label might be missing */ } | |
github.rest.issues.addLabels({...context.repo, issue_number: context.issue.number, labels: ['${{ env.LABEL_TESTING }}']}); | |
run-e2e-tests-on-request: | |
name: Run E2E tests on request | |
needs: set-progress-label | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
actions: read | |
id-token: write # needed to interact with GitHub's OIDC Token endpoint | |
strategy: | |
matrix: | |
suite: [processing, storage, governance, utils, consumption, streaming] | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup NodeJS and dependency cache | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'yarn' | |
cache-dependency-path: | | |
yarn.lock | |
framework/yarn.lock | |
solutions/yarn.lock | |
- name: Install dependencies | |
run: yarn install --check-files --frozen-lockfile | |
- name: Build | |
run: npx projen build | |
- name: Setup AWS credentials | |
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_ARN_TO_ASSUME }} | |
aws-region: ${{ env.AWS_REGION }} | |
role-duration-seconds: 10800 | |
- name: Run e2e tests | |
run: cd framework && npx jest --group=e2e/${{ matrix.suite }} | |
set-completed-label: | |
name: Set completed label | |
needs: [set-progress-label, run-e2e-tests-on-request] | |
if: always() && needs.set-progress-label.result == 'success' | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
actions: read | |
steps: | |
- name: Assign label ${{ env.LABEL_COMPLETED }} | |
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 | |
with: | |
script: | | |
github.rest.issues.addLabels({...context.repo, issue_number: context.issue.number, labels: ['${{ env.LABEL_COMPLETED }}']}); | |
try { | |
await github.rest.issues.removeLabel({...context.repo, issue_number: context.issue.number, name: '${{ env.LABEL_TESTING }}'}); | |
} catch(e) { /* OK to fail, this label might be missing when re-running single test-jobs*/ } |