From 3d1dcfc7d159b841f1ac85c7f714aba7395a7393 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Date: Mon, 6 Nov 2023 17:16:29 -0800 Subject: [PATCH 1/2] chore(actions): add ci job for branch protection --- .github/workflows/pr.yml | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a9b133e35a6..cf889679aba 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -45,9 +45,29 @@ jobs: - github-actions-test - tsc-compliance-test runs-on: ubuntu-latest - # This is a bit of a hack - Branch protections depend upon selected - # workflows that run on hardware, not parents of many callable workflows. - # Adding this so that unit and bundle checks can be a single protection line. + if: success() # only run when all checks have passed + # store success output flag for ci job + outputs: + success: ${{ steps.setoutput.outputs.success }} steps: - - name: All tests passed - run: echo "All tests passed" + - id: setoutput + run: echo "::set-output name=success::true" + ci: + runs-on: ubuntu-latest + if: always() # always run, so we never skip the check + name: Unit and Bundle tests have passed - ci + needs: all-unit-tests-pass + env: + PASSED: ${{ needs.all-unit-tests-pass.outputs.success }} + steps: + # this job passes only when output of all-unit-tests-pass job is set + # in case at least one of the checks fails, all-unit-tests-pass is skipped + # and the output will not be set, which will then cause the ci job to fail + - run: | + if [[ $PASSED == "true" ]]; then + echo "All checks have passed" + exit 0 + else + echo "One or more checks have failed" + exit 1 + fi From 12cea82fc57e3407d78006a5f894c90ada94bc56 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Date: Mon, 6 Nov 2023 18:36:33 -0800 Subject: [PATCH 2/2] test ci run --- packages/auth/src/providers/cognito/types/options.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/auth/src/providers/cognito/types/options.ts b/packages/auth/src/providers/cognito/types/options.ts index 3daeb7b3cba..1824d486b28 100644 --- a/packages/auth/src/providers/cognito/types/options.ts +++ b/packages/auth/src/providers/cognito/types/options.ts @@ -17,7 +17,7 @@ export type ConfirmResetPasswordOptions = AuthServiceOptions & { }; /** - * Options specific to Cognito Resend Sign Up code. + * Options specific to Cognito Resend Sign Up code test. */ export type ResendSignUpCodeOptions = AuthServiceOptions & { clientMetadata?: ClientMetadata;