Skip to content

Commit

Permalink
ci: move saucelabs and browserstack to regular CI jobs
Browse files Browse the repository at this point in the history
Move the saucelabs and browserstack jobs to regular CI instead of the priviledged CI to prevent cache poisoning/overload
  • Loading branch information
josephperrott committed Mar 22, 2024
1 parent da980a8 commit a4e3ca4
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 63 deletions.
61 changes: 0 additions & 61 deletions .github/workflows/ci-privileged.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,3 +300,48 @@ jobs:
with:
JOB_NAME: 'Docs site deployment'
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}

saucelabs:
runs-on: ubuntu-latest
env:
KARMA_PARALLEL_BROWSERS: 2
CI_NODE_INDEX: 0
CI_NODE_TOTAL: 1
CI_RUNNER_NUMBER: ${{ github.run_id }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@2113cd7f66a089ac0208ea84eee672b2529f4f6c
with:
cache-node-modules: true
# Checking out the pull request commit is intended here as we need to run the changed code tests.
ref: ${{ github.event.pull_request.head.sha }}
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@2113cd7f66a089ac0208ea84eee672b2529f4f6c
- name: Setup Saucelabs Variables
uses: angular/dev-infra/github-actions/saucelabs@50bb71e51d3372ca2e359adb9069f89beeac4ae7
- name: Run tests on Saucelabs
run: ./scripts/circleci/run-saucelabs-tests.sh

browserstack:
runs-on: ubuntu-latest
env:
CI_NODE_INDEX: 0
CI_NODE_TOTAL: 1
CI_RUNNER_NUMBER: ${{ github.run_id }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@2113cd7f66a089ac0208ea84eee672b2529f4f6c
with:
cache-node-modules: true
# Checking out the pull request commit is intended here as we need to run the changed code tests.
ref: ${{ github.event.pull_request.head.sha }}
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@2113cd7f66a089ac0208ea84eee672b2529f4f6c
- name: Setup Saucelabs Variables
uses: angular/dev-infra/github-actions/browserstack@a506992ba2d961ae3b07391ff14bdaf691995fa9
- name: Run tests on Browserstack
run: ./scripts/circleci/run-browserstack-tests.sh
2 changes: 1 addition & 1 deletion scripts/circleci/run-browserstack-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ projectDir="$(dirname ${0})/../.."
cd ${projectDir}

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

# Setup the test platform environment variable that will be read
# by the Karma configuration script.
Expand Down
2 changes: 1 addition & 1 deletion scripts/circleci/run-saucelabs-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
cd $(dirname ${0})/../..

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

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

0 comments on commit a4e3ca4

Please sign in to comment.