Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,25 +217,18 @@ jobs:
uses: angular/dev-infra/github-actions/bazel/configure-remote@24ba9709ca4bf6548bba6a9abfe2799e90645a60 # main
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Start Sauce Connect
uses: saucelabs/sauce-connect-action@cb88b508c6f9ff4d84490093733315dbd55de022 # v3
with:
username: ${{ vars.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
region: us-west-1
tunnelName: ${{ env.SAUCE_TUNNEL_IDENTIFIER }}
- name: Run E2E Browser tests
env:
SAUCE_USERNAME: ${{ vars.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_LOG_FILE: /tmp/angular/sauce-connect.log
SAUCE_READY_FILE: /tmp/angular/sauce-connect-ready-file.lock
SAUCE_PID_FILE: /tmp/angular/sauce-connect-pid-file.lock
SAUCE_TUNNEL_IDENTIFIER: 'angular-${{ github.run_number }}'
SAUCE_READY_FILE_TIMEOUT: 120
run: |
./scripts/saucelabs/start-tunnel.sh &
./scripts/saucelabs/wait-for-tunnel.sh
pnpm bazel test --config=saucelabs //tests:e2e.saucelabs
./scripts/saucelabs/stop-tunnel.sh
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ failure() }}
with:
name: sauce-connect-log
path: ${{ env.SAUCE_CONNECT_DIR_IN_HOST }}/sauce-connect.log
run: pnpm bazel test --config=saucelabs //tests:e2e.saucelabs

publish-snapshots:
needs: build
Expand Down
40 changes: 0 additions & 40 deletions scripts/saucelabs/start-tunnel.sh

This file was deleted.

27 changes: 0 additions & 27 deletions scripts/saucelabs/stop-tunnel.sh

This file was deleted.

28 changes: 0 additions & 28 deletions scripts/saucelabs/wait-for-tunnel.sh

This file was deleted.

115 changes: 65 additions & 50 deletions tests/e2e/assets/protractor-saucelabs.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,67 +7,82 @@ const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');

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

const capabilities = [
{
browserName: 'chrome',
version: '132',
platform: 'Windows 11',
},
{
browserName: 'chrome',
version: '131',
platform: 'Windows 11',
},
{
browserName: 'firefox',
version: '134',
platform: 'Windows 11',
},
{
browserName: 'firefox',
version: '128', // Latest Firefox ESR version as of Jan 2025
platform: 'Windows 11',
},
{
browserName: 'safari',
platform: 'macOS 13',
version: '17',
},
{
browserName: 'safari',
platform: 'macOS 12',
version: '16',
},
{
browserName: 'MicrosoftEdge',
platform: 'Windows 11',
version: '132',
},
{
browserName: 'MicrosoftEdge',
platform: 'Windows 11',
version: '131',
},
];

/**
* @type { import("protractor").Config }
*/
exports.config = {
sauceUser: process.env['SAUCE_USERNAME'],
sauceKey: process.env['SAUCE_ACCESS_KEY'],
sauceRegion: 'us',

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

// NOTE: https://saucelabs.com/products/platform-configurator can be used to determine configuration values
multiCapabilities: [
{
browserName: 'chrome',
version: '132',
platform: 'Windows 11',
tunnelIdentifier,
},
{
browserName: 'chrome',
version: '131',
platform: 'Windows 11',
tunnelIdentifier,
},
{
browserName: 'firefox',
version: '134',
platform: 'Windows 11',
tunnelIdentifier,
},
{
browserName: 'firefox',
version: '128', // Latest Firefox ESR version as of Jan 2025
platform: 'Windows 11',
tunnelIdentifier,
},
{
browserName: 'safari',
platform: 'macOS 13',
version: '17',
tunnelIdentifier,
},
{
browserName: 'safari',
platform: 'macOS 12',
version: '16',
tunnelIdentifier,
},
{
browserName: 'MicrosoftEdge',
platform: 'Windows 11',
version: '132',
tunnelIdentifier,
},
{
browserName: 'MicrosoftEdge',
platform: 'Windows 11',
version: '131',
tunnelIdentifier,
},
],
multiCapabilities: capabilities.map((caps) => {
const w3cCaps = {
...caps,
browserVersion: caps.version,
platformName: caps.platform,
};

if (tunnelIdentifier) {
return {
...w3cCaps,
tunnelIdentifier,
tunnelName: tunnelIdentifier,
'sauce:options': {
tunnelIdentifier,
tunnelName: tunnelIdentifier,
},
};
}

return w3cCaps;
}),
Comment thread
alan-agius4 marked this conversation as resolved.
Comment thread
alan-agius4 marked this conversation as resolved.

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