Skip to content

Commit af3247c

Browse files
committed
ci: upgrade to Sauce Connect 5 to fix SC4 deprecation
Starting July 31, 2026, Sauce Labs servers will no longer support Sauce Connect 4 traffic. This commit migrates the CI workflow to use saucelabs/sauce-connect-action@v3 (Sauce Connect 5) and refactors the Protractor Sauce Labs capabilities configuration.
1 parent 0ae5690 commit af3247c

5 files changed

Lines changed: 73 additions & 160 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -217,25 +217,18 @@ jobs:
217217
uses: angular/dev-infra/github-actions/bazel/configure-remote@24ba9709ca4bf6548bba6a9abfe2799e90645a60 # main
218218
with:
219219
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
220+
- name: Start Sauce Connect
221+
uses: saucelabs/sauce-connect-action@cb88b508c6f9ff4d84490093733315dbd55de022 # v3
222+
with:
223+
username: ${{ vars.SAUCE_USERNAME }}
224+
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
225+
region: us-west-1
226+
tunnelName: ${{ env.SAUCE_TUNNEL_IDENTIFIER }}
220227
- name: Run E2E Browser tests
221228
env:
222229
SAUCE_USERNAME: ${{ vars.SAUCE_USERNAME }}
223230
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
224-
SAUCE_LOG_FILE: /tmp/angular/sauce-connect.log
225-
SAUCE_READY_FILE: /tmp/angular/sauce-connect-ready-file.lock
226-
SAUCE_PID_FILE: /tmp/angular/sauce-connect-pid-file.lock
227-
SAUCE_TUNNEL_IDENTIFIER: 'angular-${{ github.run_number }}'
228-
SAUCE_READY_FILE_TIMEOUT: 120
229-
run: |
230-
./scripts/saucelabs/start-tunnel.sh &
231-
./scripts/saucelabs/wait-for-tunnel.sh
232-
pnpm bazel test --config=saucelabs //tests:e2e.saucelabs
233-
./scripts/saucelabs/stop-tunnel.sh
234-
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
235-
if: ${{ failure() }}
236-
with:
237-
name: sauce-connect-log
238-
path: ${{ env.SAUCE_CONNECT_DIR_IN_HOST }}/sauce-connect.log
231+
run: pnpm bazel test --config=saucelabs //tests:e2e.saucelabs
239232

240233
publish-snapshots:
241234
needs: build

scripts/saucelabs/start-tunnel.sh

Lines changed: 0 additions & 40 deletions
This file was deleted.

scripts/saucelabs/stop-tunnel.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

scripts/saucelabs/wait-for-tunnel.sh

Lines changed: 0 additions & 28 deletions
This file was deleted.

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

Lines changed: 65 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,67 +7,82 @@ const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
77

88
const tunnelIdentifier = process.env['SAUCE_TUNNEL_IDENTIFIER'];
99

10+
const capabilities = [
11+
{
12+
browserName: 'chrome',
13+
version: '132',
14+
platform: 'Windows 11',
15+
},
16+
{
17+
browserName: 'chrome',
18+
version: '131',
19+
platform: 'Windows 11',
20+
},
21+
{
22+
browserName: 'firefox',
23+
version: '134',
24+
platform: 'Windows 11',
25+
},
26+
{
27+
browserName: 'firefox',
28+
version: '128', // Latest Firefox ESR version as of Jan 2025
29+
platform: 'Windows 11',
30+
},
31+
{
32+
browserName: 'safari',
33+
platform: 'macOS 13',
34+
version: '17',
35+
},
36+
{
37+
browserName: 'safari',
38+
platform: 'macOS 12',
39+
version: '16',
40+
},
41+
{
42+
browserName: 'MicrosoftEdge',
43+
platform: 'Windows 11',
44+
version: '132',
45+
},
46+
{
47+
browserName: 'MicrosoftEdge',
48+
platform: 'Windows 11',
49+
version: '131',
50+
},
51+
];
52+
1053
/**
1154
* @type { import("protractor").Config }
1255
*/
1356
exports.config = {
1457
sauceUser: process.env['SAUCE_USERNAME'],
1558
sauceKey: process.env['SAUCE_ACCESS_KEY'],
59+
sauceRegion: 'us',
1660

1761
allScriptsTimeout: 11000,
1862
specs: ['./src/**/*.e2e-spec.ts'],
1963

2064
// NOTE: https://saucelabs.com/products/platform-configurator can be used to determine configuration values
21-
multiCapabilities: [
22-
{
23-
browserName: 'chrome',
24-
version: '132',
25-
platform: 'Windows 11',
26-
tunnelIdentifier,
27-
},
28-
{
29-
browserName: 'chrome',
30-
version: '131',
31-
platform: 'Windows 11',
32-
tunnelIdentifier,
33-
},
34-
{
35-
browserName: 'firefox',
36-
version: '134',
37-
platform: 'Windows 11',
38-
tunnelIdentifier,
39-
},
40-
{
41-
browserName: 'firefox',
42-
version: '128', // Latest Firefox ESR version as of Jan 2025
43-
platform: 'Windows 11',
44-
tunnelIdentifier,
45-
},
46-
{
47-
browserName: 'safari',
48-
platform: 'macOS 13',
49-
version: '17',
50-
tunnelIdentifier,
51-
},
52-
{
53-
browserName: 'safari',
54-
platform: 'macOS 12',
55-
version: '16',
56-
tunnelIdentifier,
57-
},
58-
{
59-
browserName: 'MicrosoftEdge',
60-
platform: 'Windows 11',
61-
version: '132',
62-
tunnelIdentifier,
63-
},
64-
{
65-
browserName: 'MicrosoftEdge',
66-
platform: 'Windows 11',
67-
version: '131',
68-
tunnelIdentifier,
69-
},
70-
],
65+
multiCapabilities: capabilities.map((caps) => {
66+
const w3cCaps = {
67+
...caps,
68+
browserVersion: caps.version,
69+
platformName: caps.platform,
70+
};
71+
72+
if (tunnelIdentifier) {
73+
return {
74+
...w3cCaps,
75+
tunnelIdentifier,
76+
tunnelName: tunnelIdentifier,
77+
'sauce:options': {
78+
tunnelIdentifier,
79+
tunnelName: tunnelIdentifier,
80+
},
81+
};
82+
}
83+
84+
return w3cCaps;
85+
}),
7186

7287
// Only allow one session at a time to prevent over saturation of Saucelabs sessions.
7388
maxSessions: 1,

0 commit comments

Comments
 (0)