Skip to content

Commit 8482569

Browse files
authored
chore: update sauce connect launcher (#350)
1 parent 60f8036 commit 8482569

File tree

7 files changed

+62
-72
lines changed

7 files changed

+62
-72
lines changed

.github/workflows/unit-tests.yml

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,59 +4,53 @@ name: Unit Tests
44
on: pull_request
55

66
jobs:
7-
unit-tests-p2:
8-
name: Polymer 2 on the CI agent
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: Set up Node 12.x
12-
uses: actions/setup-node@v2
13-
with:
14-
node-version: 12.x
15-
16-
- name: Check out the source code
17-
uses: actions/checkout@v2
18-
19-
- name: Install latest npm
20-
# magi-cli 1.0 requires npm 7 or higher
21-
run: "npm install -g npm@8"
22-
23-
- name: Install global npm dependencies
24-
# bower is needed to run 'bower install'
25-
# polymer-cli is needed to run the lint step
26-
run: "npm install --quiet --no-progress --global bower polymer-cli"
27-
28-
- name: Install project npm dependencies
29-
run: "npm ci"
30-
31-
- name: Install project Bower dependencies
32-
run: "bower install --quiet"
33-
34-
- name: Run automated magi-cli checks
35-
run: "npm run check"
36-
37-
- name: Run a linter
38-
run: "npm run lint"
39-
40-
# the full set of environments is tested with Polymer 3 below
41-
- name: Run unit tests locally (in the VM instance running this job)
42-
run: "xvfb-run -s '-screen 0 1024x768x24' npm test"
7+
# Running local tests is disabled due to outdated dependencies
8+
# see https://github.com/vaadin/components-team-tasks/issues/628
9+
# unit-tests-p2:
10+
# name: Polymer 2 on the CI agent
11+
# runs-on: ubuntu-latest
12+
# steps:
13+
# - name: Set up Node 16.x
14+
# uses: actions/setup-node@v4
15+
# with:
16+
# node-version: 16.x
17+
#
18+
# - name: Check out the source code
19+
# uses: actions/checkout@v2
20+
#
21+
# - name: Install global npm dependencies
22+
# # bower is needed to run 'bower install'
23+
# # polymer-cli is needed to run the lint step
24+
# run: "npm install --quiet --no-progress --global bower polymer-cli"
25+
#
26+
# - name: Install project npm dependencies
27+
# run: "npm ci"
28+
#
29+
# - name: Install project Bower dependencies
30+
# run: "bower install --quiet"
31+
#
32+
# - name: Run automated magi-cli checks
33+
# run: "npm run check"
34+
#
35+
# - name: Run a linter
36+
# run: "npm run lint"
37+
#
38+
# # the full set of environments is tested with Polymer 3 below
39+
# - name: Run unit tests locally (in the VM instance running this job)
40+
# run: "xvfb-run -s '-screen 0 1024x768x24' npm test"
4341

4442
unit-tests-p3:
4543
name: Polymer 3 on SauceLabs
4644
runs-on: ubuntu-latest
4745
steps:
48-
- name: Set up Node 12.x
49-
uses: actions/setup-node@v2
46+
- name: Set up Node 16.x
47+
uses: actions/setup-node@v4
5048
with:
51-
node-version: 12.x
49+
node-version: 16.x
5250

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

56-
- name: Install latest npm
57-
# magi-cli 1.0 requires npm 7 or higher
58-
run: "npm install -g npm@8"
59-
6054
- name: Install global npm dependencies
6155
# bower and polymer-modulizer are needed to run the Polymer 3 conversion step
6256
run: "npm install --quiet --no-progress --global bower magi-cli polymer-modulizer"
File renamed without changes.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ To use the Material theme, import the correspondent file from the `theme/materia
137137

138138
## Running tests from the command line
139139

140+
> [!WARNING]
141+
> Running tests locally from the CLI does not work due to outdated dependencies. Run tests via SauceLabs or in the browser instead.
142+
140143
1. When in the `vaadin-context-menu` directory, run `polymer test`
141144

142145

package-lock-p3.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10110,8 +10110,7 @@
1011010110
},
1011110111
"node_modules/sauce-connect-launcher": {
1011210112
"version": "1.3.2",
10113-
"resolved": "https://registry.npmjs.org/sauce-connect-launcher/-/sauce-connect-launcher-1.3.2.tgz",
10114-
"integrity": "sha512-wf0coUlidJ7rmeClgVVBh6Kw55/yalZCY/Un5RgjSnTXRAeGqagnTsTYpZaqC4dCtrY4myuYpOAZXCdbO7lHfQ==",
10113+
"resolved": "git+ssh://git@github.com/vaadin/sauce-connect-launcher.git#20fca782221404fef626c985e975268bfaba05cd",
1011510114
"dev": true,
1011610115
"hasInstallScript": true,
1011710116
"optional": true,
@@ -21727,10 +21726,9 @@
2172721726
"dev": true
2172821727
},
2172921728
"sauce-connect-launcher": {
21730-
"version": "1.3.2",
21731-
"resolved": "https://registry.npmjs.org/sauce-connect-launcher/-/sauce-connect-launcher-1.3.2.tgz",
21732-
"integrity": "sha512-wf0coUlidJ7rmeClgVVBh6Kw55/yalZCY/Un5RgjSnTXRAeGqagnTsTYpZaqC4dCtrY4myuYpOAZXCdbO7lHfQ==",
21729+
"version": "git+ssh://git@github.com/vaadin/sauce-connect-launcher.git#20fca782221404fef626c985e975268bfaba05cd",
2173321730
"dev": true,
21731+
"from": "sauce-connect-launcher@vaadin/sauce-connect-launcher#upgrade-sauce-connect-5",
2173421732
"optional": true,
2173521733
"requires": {
2173621734
"adm-zip": "~0.4.3",
@@ -23836,7 +23834,7 @@
2383623834
"cleankill": "^2.0.0",
2383723835
"lodash": "^4.17.10",
2383823836
"request": "^2.85.0",
23839-
"sauce-connect-launcher": "^1.0.0",
23837+
"sauce-connect-launcher": "vaadin/sauce-connect-launcher#upgrade-sauce-connect-5",
2384023838
"temp": "^0.8.1",
2384123839
"uuid": "^3.2.1"
2384223840
},

package-lock.json

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,10 @@
4545
},
4646
"devDependencies": {
4747
"@vaadin/vaadin-component-dev-dependencies": "^3.2.0"
48+
},
49+
"overrides": {
50+
"wct-sauce": {
51+
"sauce-connect-launcher": "vaadin/sauce-connect-launcher#upgrade-sauce-connect-5"
52+
}
4853
}
4954
}

wct.conf.js

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,6 @@ module.exports = {
1919
]
2020
}
2121
},
22-
// MAGI REMOVE START
23-
istanbul: {
24-
dir: './coverage',
25-
reporters: ['text-summary', 'lcov'],
26-
include: [
27-
'**/vaadin-context-menu/src/*.html'
28-
],
29-
exclude: [],
30-
thresholds: {
31-
global: {
32-
statements: 85
33-
}
34-
}
35-
}
36-
// MAGI REMOVE END
3722
},
3823

3924
registerHooks: function(context) {
@@ -47,11 +32,9 @@ module.exports = {
4732
'iOS Simulator/iphone@10.3', // should be 9.x, but SauceLabs does not provide that
4833
'macOS 11/safari@latest',
4934
'Windows 10/microsoftedge@latest',
50-
'Windows 10/microsoftedge@18',
5135
'Windows 10/internet explorer@11',
5236
'Windows 10/chrome@latest',
5337
'Windows 10/firefox@latest',
54-
'Windows 10/firefox@78', // latest ESR as of 2021-06-30
5538
];
5639

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

6447
context.options.plugins.sauce.browsers = testBrowsers;
6548
}
49+
50+
// Map legacy tunnel-identifier option to new tunnel-name option
51+
context.hookLate('prepare', (done) => {
52+
context.options.activeBrowsers.forEach((browser) => {
53+
browser['tunnel-name'] = browser['tunnel-identifier'];
54+
delete browser['tunnel-identifier'];
55+
});
56+
done();
57+
});
6658
}
6759
};

0 commit comments

Comments
 (0)