Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update sauce connect launcher #848

Merged
merged 1 commit into from
Feb 10, 2025
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
80 changes: 37 additions & 43 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,53 @@ name: Unit Tests
on: pull_request

jobs:
unit-tests-p2:
name: Polymer 2 on the CI agent
runs-on: ubuntu-latest
steps:
- name: Set up Node 12.x
uses: actions/setup-node@v2
with:
node-version: 12.x

- name: Check out the source code
uses: actions/checkout@v2

- name: Install latest npm
# magi-cli 1.0 requires npm 7 or higher
run: "npm install -g npm@8"

- name: Install global npm dependencies
# bower is needed to run 'bower install'
# polymer-cli is needed to run the lint step
run: "npm install --quiet --no-progress --global bower polymer-cli"

- name: Install project npm dependencies
run: "npm ci"

- name: Install project Bower dependencies
run: "bower install --quiet"

- name: Run automated magi-cli checks
run: "npm run check"

- name: Run a linter
run: "npm run lint"

# the full set of environments is tested with Polymer 3 below
- name: Run unit tests locally (in the VM instance running this job)
run: "xvfb-run -s '-screen 0 1024x768x24' npm test"
# Running local tests is disabled due to outdated dependencies
# see https://github.com/vaadin/components-team-tasks/issues/628
# unit-tests-p2:
# name: Polymer 2 on the CI agent
# runs-on: ubuntu-latest
# steps:
# - name: Set up Node 16.x
# uses: actions/setup-node@v4
# with:
# node-version: 16.x
#
# - name: Check out the source code
# uses: actions/checkout@v2
#
# - name: Install global npm dependencies
# # bower is needed to run 'bower install'
# # polymer-cli is needed to run the lint step
# run: "npm install --quiet --no-progress --global bower polymer-cli"
#
# - name: Install project npm dependencies
# run: "npm ci"
#
# - name: Install project Bower dependencies
# run: "bower install --quiet"
#
# - name: Run automated magi-cli checks
# run: "npm run check"
#
# - name: Run a linter
# run: "npm run lint"
#
# # the full set of environments is tested with Polymer 3 below
# - name: Run unit tests locally (in the VM instance running this job)
# run: "xvfb-run -s '-screen 0 1024x768x24' npm test"

unit-tests-p3:
name: Polymer 3 on SauceLabs
runs-on: ubuntu-latest
steps:
- name: Set up Node 12.x
uses: actions/setup-node@v2
- name: Set up Node 16.x
uses: actions/setup-node@v4
with:
node-version: 12.x
node-version: 16.x

- name: Check out the (Polymer 2) source code
uses: actions/checkout@v2

- name: Install latest npm
# magi-cli 1.0 requires npm 7 or higher
run: "npm install -g npm@8"

- name: Install global npm dependencies
# bower and polymer-modulizer are needed to run the Polymer 3 conversion step
run: "npm install --quiet --no-progress --global bower magi-cli polymer-modulizer"
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ and [Polymer](https://polymer-library.polymer-project.org/) installed.

## Running tests from the command line

> [!WARNING]
> Running tests locally from the CLI does not work due to outdated dependencies. Run tests via SauceLabs or in the browser instead.

1. When in the `vaadin-date-picker` directory, run `npm test` (this will execute:"test": "wct")
(tests will be fetched from the `test/basics.html` file)

Expand Down
10 changes: 4 additions & 6 deletions package-lock-p3.json
Original file line number Diff line number Diff line change
Expand Up @@ -10093,8 +10093,7 @@
},
"node_modules/sauce-connect-launcher": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/sauce-connect-launcher/-/sauce-connect-launcher-1.3.2.tgz",
"integrity": "sha512-wf0coUlidJ7rmeClgVVBh6Kw55/yalZCY/Un5RgjSnTXRAeGqagnTsTYpZaqC4dCtrY4myuYpOAZXCdbO7lHfQ==",
"resolved": "git+ssh://[email protected]/vaadin/sauce-connect-launcher.git#20fca782221404fef626c985e975268bfaba05cd",
"dev": true,
"hasInstallScript": true,
"optional": true,
Expand Down Expand Up @@ -21706,10 +21705,9 @@
"dev": true
},
"sauce-connect-launcher": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/sauce-connect-launcher/-/sauce-connect-launcher-1.3.2.tgz",
"integrity": "sha512-wf0coUlidJ7rmeClgVVBh6Kw55/yalZCY/Un5RgjSnTXRAeGqagnTsTYpZaqC4dCtrY4myuYpOAZXCdbO7lHfQ==",
"version": "git+ssh://[email protected]/vaadin/sauce-connect-launcher.git#20fca782221404fef626c985e975268bfaba05cd",
"dev": true,
"from": "sauce-connect-launcher@vaadin/sauce-connect-launcher#upgrade-sauce-connect-5",
"optional": true,
"requires": {
"adm-zip": "~0.4.3",
Expand Down Expand Up @@ -23830,7 +23828,7 @@
"cleankill": "^2.0.0",
"lodash": "^4.17.10",
"request": "^2.85.0",
"sauce-connect-launcher": "^1.0.0",
"sauce-connect-launcher": "vaadin/sauce-connect-launcher#upgrade-sauce-connect-5",
"temp": "^0.8.1",
"uuid": "^3.2.1"
},
Expand Down
10 changes: 4 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,10 @@
},
"devDependencies": {
"@vaadin/vaadin-component-dev-dependencies": "^3.2.0"
},
"overrides": {
"wct-sauce": {
"sauce-connect-launcher": "vaadin/sauce-connect-launcher#upgrade-sauce-connect-5"
}
}
}
26 changes: 9 additions & 17 deletions wct.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,6 @@ module.exports = {
]
}
},
// MAGI REMOVE START
istanbul: {
dir: './coverage',
reporters: ['text-summary', 'lcov'],
include: [
'**/vaadin-date-picker/src/*.html'
],
exclude: [],
thresholds: {
global: {
statements: 91
}
}
}
// MAGI REMOVE END
},

registerHooks: function(context) {
Expand All @@ -47,11 +32,9 @@ module.exports = {
'iOS Simulator/[email protected]', // should be 9.x, but SauceLabs does not provide that
'macOS 11/safari@latest',
'Windows 10/microsoftedge@latest',
'Windows 10/microsoftedge@18',
'Windows 10/internet explorer@11',
'Windows 10/chrome@latest',
'Windows 10/firefox@latest',
'Windows 10/firefox@78', // latest ESR as of 2021-06-30
];

if (env === 'saucelabs') {
Expand All @@ -63,5 +46,14 @@ module.exports = {

context.options.plugins.sauce.browsers = testBrowsers;
}

// Map legacy tunnel-identifier option to new tunnel-name option
context.hookLate('prepare', (done) => {
context.options.activeBrowsers.forEach((browser) => {
browser['tunnel-name'] = browser['tunnel-identifier'];
delete browser['tunnel-identifier'];
});
done();
});
}
};
Loading