From c2055a00597a80f713b78b1650e8d3418f4d9a65 Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux <6574550+tibdex@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:04:08 -0500 Subject: [PATCH] Make the integration test optional (#67) --- .github/workflows/test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a6ba9a94..711f3fa2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,14 +10,22 @@ 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 - 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.outcome != 'skipped' }}