Skip to content

Commit

Permalink
build: remove iOS test runs (angular#30156)
Browse files Browse the repository at this point in the history
Removes the tests that run against iOS. There are a couple of reasons to do so:
* The tests haven't caught any issues in years.
* The tests tend to be flaky.
* They're running aginst iOS 15 which Angular no longer supports. We can't update to anything newer, because we would have to update our Saucelabs setup which will require dev infra time investment.
  • Loading branch information
crisbeto authored Dec 10, 2024
1 parent 75c8aa8 commit e935d0b
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 1,815 deletions.
23 changes: 1 addition & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,27 +261,6 @@ jobs:
JOB_NAME: 'Docs site deployment'
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}

saucelabs:
runs-on: ubuntu-latest
env:
KARMA_PARALLEL_BROWSERS: 2
CI_NODE_INDEX: 0
CI_NODE_TOTAL: 1
CI_RUNNER_NUMBER: ${{ github.run_id }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@40b2cbdbcc40f36f125d721c4e8decd3bb607ea4
with:
cache-node-modules: true
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@40b2cbdbcc40f36f125d721c4e8decd3bb607ea4
- name: Setup Saucelabs Variables
uses: angular/dev-infra/github-actions/saucelabs@40b2cbdbcc40f36f125d721c4e8decd3bb607ea4
- name: Run tests on Saucelabs
run: ./scripts/circleci/run-saucelabs-tests.sh

browserstack:
runs-on: ubuntu-latest
env:
Expand All @@ -297,7 +276,7 @@ jobs:
run: yarn install --frozen-lockfile
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@40b2cbdbcc40f36f125d721c4e8decd3bb607ea4
- name: Setup Saucelabs Variables
- name: Setup Browserstack Variables
uses: angular/dev-infra/github-actions/browserstack@40b2cbdbcc40f36f125d721c4e8decd3bb607ea4
- name: Run tests on Browserstack
run: ./scripts/circleci/run-browserstack-tests.sh
25 changes: 1 addition & 24 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,29 +189,6 @@ jobs:
name: Package Artifacts
path: dist/release-archives

saucelabs:
runs-on: ubuntu-latest
env:
KARMA_PARALLEL_BROWSERS: 2
CI_NODE_INDEX: 0
CI_NODE_TOTAL: 1
CI_RUNNER_NUMBER: ${{ github.run_id }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@40b2cbdbcc40f36f125d721c4e8decd3bb607ea4
with:
cache-node-modules: true
# Checking out the pull request commit is intended here as we need to run the changed code tests.
ref: ${{ github.event.pull_request.head.sha }}
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@40b2cbdbcc40f36f125d721c4e8decd3bb607ea4
- name: Setup Saucelabs Variables
uses: angular/dev-infra/github-actions/saucelabs@40b2cbdbcc40f36f125d721c4e8decd3bb607ea4
- name: Run tests on Saucelabs
run: ./scripts/circleci/run-saucelabs-tests.sh

browserstack:
runs-on: ubuntu-latest
env:
Expand All @@ -229,7 +206,7 @@ jobs:
run: yarn install --frozen-lockfile
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@40b2cbdbcc40f36f125d721c4e8decd3bb607ea4
- name: Setup Saucelabs Variables
- name: Setup Browserstack Variables
uses: angular/dev-infra/github-actions/browserstack@40b2cbdbcc40f36f125d721c4e8decd3bb607ea4
- name: Run tests on Browserstack
run: ./scripts/circleci/run-browserstack-tests.sh
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@
"karma-jasmine": "^4.0.1",
"karma-parallel": "^0.3.1",
"karma-requirejs": "^1.1.0",
"karma-sauce-launcher": "^4.3.6",
"karma-sourcemap-loader": "^0.3.8",
"luxon": "^3.0.0",
"madge": "^4.0.0",
Expand Down
32 changes: 0 additions & 32 deletions scripts/circleci/run-saucelabs-tests.sh

This file was deleted.

38 changes: 0 additions & 38 deletions scripts/saucelabs/start-tunnel.sh

This file was deleted.

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

This file was deleted.

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

This file was deleted.

3 changes: 0 additions & 3 deletions test/browser-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
* Browser Configuration for the different jobs in the legacy Karma tests.
*
* - `browserstack`: Launches the browser within BrowserStack
* - `saucelabs`: Launches the browser within Saucelabs
*/
const browserConfig = {
'iOS15': {unitTest: {target: 'saucelabs'}},
'Safari16': {unitTest: {target: 'browserstack'}},
};

Expand All @@ -14,7 +12,6 @@ exports.customLaunchers = require('./karma-browsers.json');

/** Exports a map of configured browsers, which should run in the given platform. */
exports.platformMap = {
'saucelabs': buildConfiguration('unitTest', 'saucelabs'),
'browserstack': buildConfiguration('unitTest', 'browserstack'),
};

Expand Down
9 changes: 0 additions & 9 deletions test/karma-browsers.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"SAUCELABS_IOS15": {
"base": "SauceLabs",
"appiumVersion": "1.22.0",
"deviceOrientation": "portrait",
"browserName": "Safari",
"platformVersion": "15.0",
"platformName": "iOS",
"deviceName": "iPhone 13 Pro Max Simulator"
},
"BROWSERSTACK_SAFARI16": {
"base": "BrowserStack",
"browser": "Safari",
Expand Down
17 changes: 0 additions & 17 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = config => {
plugins: [
require('karma-jasmine'),
require('karma-browserstack-launcher'),
require('karma-sauce-launcher'),
require('karma-sourcemap-loader'),
{
'middleware:fake-url': [
Expand Down Expand Up @@ -72,16 +71,6 @@ module.exports = config => {
reporters: ['dots'],
autoWatch: false,

sauceLabs: {
testName: 'Angular Material Unit Tests',
startConnect: false,
recordVideo: false,
recordScreenshots: false,
idleTimeout: 1000,
commandTimeout: 600,
maxDuration: 5400,
},

browserStack: {
project: 'Angular Material Unit Tests',
startTunnel: true,
Expand Down Expand Up @@ -134,12 +123,6 @@ module.exports = config => {
if (testPlatform === 'browserstack') {
config.browserStack.build = buildIdentifier;
config.browserStack.tunnelIdentifier = tunnelIdentifier;
} else if (testPlatform === 'saucelabs') {
config.sauceLabs.build = buildIdentifier;
config.sauceLabs.tunnelIdentifier = tunnelIdentifier;
// Setup the saucelabs reporter so that we report back to Saucelabs once
// our tests finished.
config.reporters.push('saucelabs');
}

// If the test platform is not "local", browsers are launched externally and can take
Expand Down
Loading

0 comments on commit e935d0b

Please sign in to comment.