From ea07d33b294e475d85fefef6f62510ac77bde2e2 Mon Sep 17 00:00:00 2001 From: Alberto Fernandez-Capel Date: Wed, 31 Aug 2022 12:18:34 +0100 Subject: [PATCH] Configure Sauce Connect Proxy to work with Github actions See: - https://docs.saucelabs.com/secure-connections/sauce-connect/index.html - https://docs.saucelabs.com/dev/cli/saucectl/usage/ci/github-actions/ --- .github/workflows/ci.yml | 10 ++++++++++ bin/ci | 8 -------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa4f542f..c98cf1b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,16 @@ jobs: with: path: test/node_modules key: ${{ runner.os }}-${{ hashFiles('test/yarn.lock') }} + - uses: saucelabs/sauce-connect-action@v2 + with: + username: ${{ secrets.SAUCE_USERNAME }} + accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} + tunnelName: Basecamp-CI_tunnel_name + region: us-west - run: yarn install - run: bin/ci + +env: + SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} + SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} diff --git a/bin/ci b/bin/ci index 300c587c..0fa3b7db 100755 --- a/bin/ci +++ b/bin/ci @@ -13,12 +13,4 @@ if [ -n "$CI" ]; then echo "GITHUB_BASE_REF: $GITHUB_BASE_REF" fi -if [ -n "$CI" ] && [ "$GITHUB_REF" == "refs/heads/main" ] && [ -z "$GITHUB_HEAD_REF" ]; then - $(base64 --decode <<< ZXhwb3J0IFNBVUNFX1VTRVJOQU1FPWJhc2VjYW1wX3RyaXgK) - $(base64 --decode <<< ZXhwb3J0IFNBVUNFX0FDQ0VTU19LRVk9MjY3OGE4NzMtNzJmNC00NzU2LTkzYjUtZjFhOGUyZTc3ODIxCg==) -else - $(base64 --decode <<< ZXhwb3J0IFNBVUNFX1VTRVJOQU1FPWJhc2VjYW1wX3RyaXhfZGV2Cg==) - $(base64 --decode <<< ZXhwb3J0IFNBVUNFX0FDQ0VTU19LRVk9NTIzODNlNTItZTM4NC00MzZjLWFkMmUtMGZmNTcyNjIyNjc5Cg==) -fi - yarn test