Skip to content

Commit 7a9fcc3

Browse files
committed
ci: upgrade to Sauce Connect 5 to fix SC4 deprecation
Sauce Connect 4 (SC4) reaches end of life on July 31, 2026 and will no longer be supported by Sauce Labs servers. This commit updates our CI workflow to use Sauce Connect 5 via the official GitHub action saucelabs/sauce-connect-action@v3 (pinned to release v3 SHA cb88b508c6f9ff4d84490093733315dbd55de022): - Replaces legacy Sauce Connect 4 manual scripts (start-tunnel.sh, wait-for-tunnel.sh, stop-tunnel.sh) in .github/workflows/ci.yml with saucelabs/sauce-connect-action@v3, which manages the Sauce Connect 5 tunnel lifecycle automatically. - Specifies required region input (`region: us-west`) and modern tunnel input (`tunnelName: ${{ env.SAUCE_TUNNEL_IDENTIFIER }}`). - Removes obsolete SC4 legacy environment variables (SAUCE_LOG_FILE, SAUCE_READY_FILE, SAUCE_PID_FILE, SAUCE_READY_FILE_TIMEOUT) and the sauce-connect.log upload artifact step. - Updates Protractor Sauce capabilities in tests/e2e/assets/protractor-saucelabs.conf.js to specify `sauceRegion: 'us'` and include `tunnelName` alongside `tunnelIdentifier` for SC5 W3C capability compatibility. TAG=agy CONV=364b9a2f-e7e4-4f68-9f2a-92ecc5151b67
1 parent ef75f6a commit 7a9fcc3

5 files changed

Lines changed: 49 additions & 110 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
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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const tunnelIdentifier = process.env['SAUCE_TUNNEL_IDENTIFIER'];
1313
exports.config = {
1414
sauceUser: process.env['SAUCE_USERNAME'],
1515
sauceKey: process.env['SAUCE_ACCESS_KEY'],
16+
sauceRegion: 'us',
1617

1718
allScriptsTimeout: 11000,
1819
specs: ['./src/**/*.e2e-spec.ts'],
@@ -24,48 +25,88 @@ exports.config = {
2425
version: '132',
2526
platform: 'Windows 11',
2627
tunnelIdentifier,
28+
tunnelName: tunnelIdentifier,
29+
'sauce:options': {
30+
tunnelIdentifier,
31+
tunnelName: tunnelIdentifier,
32+
},
2733
},
2834
{
2935
browserName: 'chrome',
3036
version: '131',
3137
platform: 'Windows 11',
3238
tunnelIdentifier,
39+
tunnelName: tunnelIdentifier,
40+
'sauce:options': {
41+
tunnelIdentifier,
42+
tunnelName: tunnelIdentifier,
43+
},
3344
},
3445
{
3546
browserName: 'firefox',
3647
version: '134',
3748
platform: 'Windows 11',
3849
tunnelIdentifier,
50+
tunnelName: tunnelIdentifier,
51+
'sauce:options': {
52+
tunnelIdentifier,
53+
tunnelName: tunnelIdentifier,
54+
},
3955
},
4056
{
4157
browserName: 'firefox',
4258
version: '128', // Latest Firefox ESR version as of Jan 2025
4359
platform: 'Windows 11',
4460
tunnelIdentifier,
61+
tunnelName: tunnelIdentifier,
62+
'sauce:options': {
63+
tunnelIdentifier,
64+
tunnelName: tunnelIdentifier,
65+
},
4566
},
4667
{
4768
browserName: 'safari',
4869
platform: 'macOS 13',
4970
version: '17',
5071
tunnelIdentifier,
72+
tunnelName: tunnelIdentifier,
73+
'sauce:options': {
74+
tunnelIdentifier,
75+
tunnelName: tunnelIdentifier,
76+
},
5177
},
5278
{
5379
browserName: 'safari',
5480
platform: 'macOS 12',
5581
version: '16',
5682
tunnelIdentifier,
83+
tunnelName: tunnelIdentifier,
84+
'sauce:options': {
85+
tunnelIdentifier,
86+
tunnelName: tunnelIdentifier,
87+
},
5788
},
5889
{
5990
browserName: 'MicrosoftEdge',
6091
platform: 'Windows 11',
6192
version: '132',
6293
tunnelIdentifier,
94+
tunnelName: tunnelIdentifier,
95+
'sauce:options': {
96+
tunnelIdentifier,
97+
tunnelName: tunnelIdentifier,
98+
},
6399
},
64100
{
65101
browserName: 'MicrosoftEdge',
66102
platform: 'Windows 11',
67103
version: '131',
68104
tunnelIdentifier,
105+
tunnelName: tunnelIdentifier,
106+
'sauce:options': {
107+
tunnelIdentifier,
108+
tunnelName: tunnelIdentifier,
109+
},
69110
},
70111
],
71112

0 commit comments

Comments
 (0)