From acc43a89e2aaef836b9bb02d0c3c405ad41435ce Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux Date: Fri, 27 Jan 2023 13:43:48 -0500 Subject: [PATCH 1/6] Make the integration test optional --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a6ba9a94..bf1b39c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,9 +15,13 @@ jobs: - run: yarn run build - run: yarn run prettier --check - run: yarn run xo + # Optional integration test of the action using a dedicated GitHub App. - id: generate_token + if: ${{ vars.TEST_GITHUB_APP_ID == '' }} uses: ./ with: + # The only required permission is `Repository permissions > Metadata: Read-only`. app_id: ${{ vars.TEST_GITHUB_APP_ID }} private_key: ${{ secrets.TEST_GITHUB_APP_PRIVATE_KEY }} - run: node --eval "assert('${{ steps.generate_token.outputs.token }}'.length > 0);" + if: ${{ steps.generate_token.outputs.outcome != "skipped" }} From 7b57d8a8268e32436e541e40a7cc25debe804bb2 Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux Date: Fri, 27 Jan 2023 13:45:21 -0500 Subject: [PATCH 2/6] fixup! Make the integration test optional --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bf1b39c6..b938ca28 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,4 +24,4 @@ jobs: app_id: ${{ vars.TEST_GITHUB_APP_ID }} private_key: ${{ secrets.TEST_GITHUB_APP_PRIVATE_KEY }} - run: node --eval "assert('${{ steps.generate_token.outputs.token }}'.length > 0);" - if: ${{ steps.generate_token.outputs.outcome != "skipped" }} + if: ${{ steps.generate_token.outputs.outcome != 'skipped' }} From 7ecec9e539d61ee72437aff6fa4ff2c72b908ec6 Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux Date: Fri, 27 Jan 2023 13:48:29 -0500 Subject: [PATCH 3/6] fixup! Make the integration test optional --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b938ca28..ff9140ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: yarn - run: yarn install --frozen-lockfile - run: yarn run yarn-deduplicate --fail --strategy fewer - run: yarn run build @@ -23,5 +27,6 @@ jobs: # The only required permission is `Repository permissions > Metadata: Read-only`. app_id: ${{ vars.TEST_GITHUB_APP_ID }} private_key: ${{ secrets.TEST_GITHUB_APP_PRIVATE_KEY }} + - run: echo "${{ steps.generate_token.outputs.outcome }}" - run: node --eval "assert('${{ steps.generate_token.outputs.token }}'.length > 0);" if: ${{ steps.generate_token.outputs.outcome != 'skipped' }} From 6ce623cee74ff977aa9f5105196dc50f1012c315 Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux Date: Fri, 27 Jan 2023 13:50:31 -0500 Subject: [PATCH 4/6] fixup! Make the integration test optional --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ff9140ae..f9f35293 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,6 +27,6 @@ jobs: # The only required permission is `Repository permissions > Metadata: Read-only`. app_id: ${{ vars.TEST_GITHUB_APP_ID }} private_key: ${{ secrets.TEST_GITHUB_APP_PRIVATE_KEY }} - - run: echo "${{ steps.generate_token.outputs.outcome }}" + - run: echo "${{ steps.generate_token.outcome }}" - run: node --eval "assert('${{ steps.generate_token.outputs.token }}'.length > 0);" if: ${{ steps.generate_token.outputs.outcome != 'skipped' }} From c218cd2caffc548df86355191747bbcb9f1a8bd9 Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux Date: Fri, 27 Jan 2023 13:55:10 -0500 Subject: [PATCH 5/6] fixup! Make the integration test optional --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9f35293..d92b68af 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,6 +27,5 @@ jobs: # The only required permission is `Repository permissions > Metadata: Read-only`. app_id: ${{ vars.TEST_GITHUB_APP_ID }} private_key: ${{ secrets.TEST_GITHUB_APP_PRIVATE_KEY }} - - run: echo "${{ steps.generate_token.outcome }}" - run: node --eval "assert('${{ steps.generate_token.outputs.token }}'.length > 0);" - if: ${{ steps.generate_token.outputs.outcome != 'skipped' }} + if: ${{ steps.generate_token.outcome != 'skipped' }} From dbb070add68c0041592145addd1ea03cb34a2555 Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux Date: Fri, 27 Jan 2023 13:57:25 -0500 Subject: [PATCH 6/6] fixup! Make the integration test optional --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d92b68af..711f3fa2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: - run: yarn run xo # Optional integration test of the action using a dedicated GitHub App. - id: generate_token - if: ${{ vars.TEST_GITHUB_APP_ID == '' }} + if: ${{ vars.TEST_GITHUB_APP_ID != '' }} uses: ./ with: # The only required permission is `Repository permissions > Metadata: Read-only`.