Skip to content

Commit 5642e06

Browse files
committed
ci: use W3C-compliant Sauce Labs tunnelName and remove deprecated tunnelIdentifier
1 parent b74eef8 commit 5642e06

2 files changed

Lines changed: 29 additions & 4 deletions

File tree

.github/workflows/pr.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,31 @@ jobs:
214214
uses: angular/dev-infra/github-actions/bazel/configure-remote@24ba9709ca4bf6548bba6a9abfe2799e90645a60 # main
215215
- name: Run CLI E2E tests
216216
run: pnpm bazel test --test_env=E2E_SHARD_TOTAL=6 --test_env=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests:e2e.snapshots.${{ matrix.subset }}_node${{ matrix.node }}
217+
218+
test-saucelabs:
219+
needs: build
220+
runs-on: ubuntu-latest
221+
name: Browser Compatibility Tests
222+
env:
223+
SAUCE_TUNNEL_IDENTIFIER: 'angular-${{ github.run_number }}'
224+
steps:
225+
- name: Initialize environment
226+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@24ba9709ca4bf6548bba6a9abfe2799e90645a60 # main
227+
- name: Install node modules
228+
run: pnpm install --frozen-lockfile
229+
- name: Setup Bazel
230+
uses: angular/dev-infra/github-actions/bazel/setup@24ba9709ca4bf6548bba6a9abfe2799e90645a60 # main
231+
- name: Setup Bazel RBE
232+
uses: angular/dev-infra/github-actions/bazel/configure-remote@24ba9709ca4bf6548bba6a9abfe2799e90645a60 # main
233+
- name: Start Sauce Connect
234+
uses: saucelabs/sauce-connect-action@cb88b508c6f9ff4d84490093733315dbd55de022 # v3
235+
with:
236+
username: ${{ vars.SAUCE_USERNAME }}
237+
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
238+
region: us-west-1
239+
tunnelName: ${{ env.SAUCE_TUNNEL_IDENTIFIER }}
240+
- name: Run E2E Browser tests
241+
env:
242+
SAUCE_USERNAME: ${{ vars.SAUCE_USERNAME }}
243+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
244+
run: pnpm bazel test --config=saucelabs //tests:e2e.saucelabs

tests/e2e/assets/protractor-saucelabs.conf.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,15 @@ exports.config = {
6464
// NOTE: https://saucelabs.com/products/platform-configurator can be used to determine configuration values
6565
multiCapabilities: capabilities.map((caps) => {
6666
const w3cCaps = {
67-
...caps,
67+
browserName: caps.browserName,
6868
browserVersion: caps.version,
6969
platformName: caps.platform,
7070
};
7171

7272
if (tunnelIdentifier) {
7373
return {
7474
...w3cCaps,
75-
tunnelIdentifier,
76-
tunnelName: tunnelIdentifier,
7775
'sauce:options': {
78-
tunnelIdentifier,
7976
tunnelName: tunnelIdentifier,
8077
},
8178
};

0 commit comments

Comments
 (0)