Skip to content

Commit f71fe20

Browse files
ci: move saucelabs and browserstack to regular CI jobs (#28765)
Move the saucelabs and browserstack jobs to regular CI instead of the priviledged CI to prevent cache poisoning/overload
1 parent 99677b7 commit f71fe20

File tree

4 files changed

+47
-63
lines changed

4 files changed

+47
-63
lines changed

.github/workflows/ci-privileged.yml

-61
This file was deleted.

.github/workflows/ci.yml

+45
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,48 @@ jobs:
300300
with:
301301
JOB_NAME: 'Docs site deployment'
302302
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}
303+
304+
saucelabs:
305+
runs-on: ubuntu-latest
306+
env:
307+
KARMA_PARALLEL_BROWSERS: 2
308+
CI_NODE_INDEX: 0
309+
CI_NODE_TOTAL: 1
310+
CI_RUNNER_NUMBER: ${{ github.run_id }}
311+
steps:
312+
- name: Initialize environment
313+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@2113cd7f66a089ac0208ea84eee672b2529f4f6c
314+
with:
315+
cache-node-modules: true
316+
# Checking out the pull request commit is intended here as we need to run the changed code tests.
317+
ref: ${{ github.event.pull_request.head.sha }}
318+
- name: Install node modules
319+
run: yarn install --frozen-lockfile
320+
- name: Setup Bazel
321+
uses: angular/dev-infra/github-actions/bazel/setup@2113cd7f66a089ac0208ea84eee672b2529f4f6c
322+
- name: Setup Saucelabs Variables
323+
uses: angular/dev-infra/github-actions/saucelabs@4b433074a806bbbd4d319264430740cd46e62f27
324+
- name: Run tests on Saucelabs
325+
run: ./scripts/circleci/run-saucelabs-tests.sh
326+
327+
browserstack:
328+
runs-on: ubuntu-latest
329+
env:
330+
CI_NODE_INDEX: 0
331+
CI_NODE_TOTAL: 1
332+
CI_RUNNER_NUMBER: ${{ github.run_id }}
333+
steps:
334+
- name: Initialize environment
335+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@2113cd7f66a089ac0208ea84eee672b2529f4f6c
336+
with:
337+
cache-node-modules: true
338+
# Checking out the pull request commit is intended here as we need to run the changed code tests.
339+
ref: ${{ github.event.pull_request.head.sha }}
340+
- name: Install node modules
341+
run: yarn install --frozen-lockfile
342+
- name: Setup Bazel
343+
uses: angular/dev-infra/github-actions/bazel/setup@2113cd7f66a089ac0208ea84eee672b2529f4f6c
344+
- name: Setup Saucelabs Variables
345+
uses: angular/dev-infra/github-actions/browserstack@4b433074a806bbbd4d319264430740cd46e62f27
346+
- name: Run tests on Browserstack
347+
run: ./scripts/circleci/run-browserstack-tests.sh

scripts/circleci/run-browserstack-tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ projectDir="$(dirname ${0})/../.."
1111
cd ${projectDir}
1212

1313
# Decode access token and make it accessible for child processes.
14-
export BROWSER_STACK_ACCESS_KEY=`echo ${BROWSER_STACK_ACCESS_KEY} | rev`
14+
export BROWSER_STACK_ACCESS_KEY=`echo ${BROWSER_STACK_ACCESS_KEY}`
1515

1616
# Setup the test platform environment variable that will be read
1717
# by the Karma configuration script.

scripts/circleci/run-saucelabs-tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -e
88
cd $(dirname ${0})/../..
99

1010
# Decode access token and make it accessible for child processes.
11-
export SAUCE_ACCESS_KEY=`echo ${SAUCE_ACCESS_KEY} | rev`
11+
export SAUCE_ACCESS_KEY=`echo ${SAUCE_ACCESS_KEY}`
1212

1313
# Start tunnel and wait for it being ready.
1414
./scripts/saucelabs/start-tunnel.sh &

0 commit comments

Comments
 (0)