Skip to content

Commit 77372ec

Browse files
committed
ci: upgrade to Sauce Connect 5 to fix SC4 deprecation
1 parent 3fc6799 commit 77372ec

5 files changed

Lines changed: 65 additions & 161 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -226,25 +226,26 @@ jobs:
226226
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
227227
with:
228228
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
229+
- name: Start Sauce Connect
230+
uses: saucelabs/sauce-connect-action@cb88b508c6f9ff4d84490093733315dbd55de022 # v3
231+
timeout-minutes: 10
232+
with:
233+
username: ${{ vars.SAUCE_USERNAME }}
234+
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
235+
region: us-west-1
236+
tunnelName: ${{ env.SAUCE_TUNNEL_IDENTIFIER }}
237+
proxyLocalhost: allow
238+
# By default we disable SSL bumping for all requests. This is because SSL bumping is not needed
239+
# for our test setup and in order to perform the SSL bumping, Saucelabs intercepts all HTTP
240+
# requests in the tunnel VM and modifies them. This can cause flakiness as it makes all requests
241+
# dependent on the SSL bumping middleware.
242+
# See: https://wiki.saucelabs.com/display/DOCS/Troubleshooting+Sauce+Connect#TroubleshootingSauceConnect-DisablingSSLBumping
243+
tlsPassthroughDomains: all
229244
- name: Run E2E Browser tests
230245
env:
231246
SAUCE_USERNAME: ${{ vars.SAUCE_USERNAME }}
232247
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
233-
SAUCE_LOG_FILE: /tmp/angular/sauce-connect.log
234-
SAUCE_READY_FILE: /tmp/angular/sauce-connect-ready-file.lock
235-
SAUCE_PID_FILE: /tmp/angular/sauce-connect-pid-file.lock
236-
SAUCE_TUNNEL_IDENTIFIER: 'angular-${{ github.run_number }}'
237-
SAUCE_READY_FILE_TIMEOUT: 120
238-
run: |
239-
./scripts/saucelabs/start-tunnel.sh &
240-
./scripts/saucelabs/wait-for-tunnel.sh
241-
pnpm bazel test --config=saucelabs //tests:e2e.saucelabs
242-
./scripts/saucelabs/stop-tunnel.sh
243-
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
244-
if: ${{ failure() }}
245-
with:
246-
name: sauce-connect-log
247-
path: ${{ env.SAUCE_CONNECT_DIR_IN_HOST }}/sauce-connect.log
248+
run: pnpm bazel test --config=saucelabs //tests:e2e.saucelabs
248249

249250
publish-snapshots:
250251
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: 49 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,69 +5,67 @@
55

66
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
77

8-
const tunnelIdentifier = process.env['SAUCE_TUNNEL_IDENTIFIER'];
8+
const tunnelName = process.env['SAUCE_TUNNEL_IDENTIFIER'];
9+
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+
];
952

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+
...caps,
67+
tunnelName,
68+
})),
7169

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

0 commit comments

Comments
 (0)