Skip to content

Commit

Permalink
chore: update sauce connect launcher (#2253)
Browse files Browse the repository at this point in the history
* chore: update sauce connect launcher

* increase timeout

* fix workflow commands
  • Loading branch information
sissbruecker authored Feb 10, 2025
1 parent d5f5005 commit d35d50b
Show file tree
Hide file tree
Showing 10 changed files with 149 additions and 273 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/local.yml

This file was deleted.

66 changes: 0 additions & 66 deletions .github/workflows/sauce-p2.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/sauce-p3.yml

This file was deleted.

96 changes: 96 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Unit Tests

# all pull requests
on: pull_request

jobs:
# 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 16.x
uses: actions/setup-node@v4
with:
node-version: 16.x

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

- 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"

- name: Convert the source code to Polymer 3
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
magi p3-convert --out . --import-style=name
# workaround for running tests on Android on SauceLabs (see wct.conf.js)
- name: Add 'localhost-for-saucelabs' to /etc/hosts
run: echo "127.0.0.1 localhost-for-saucelabs" | sudo tee -a /etc/hosts

- name: Run unit tests [Desktop / Batch 1]
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: npm test -- --env saucelabs --suites batch1

- name: Run unit tests [Desktop / Batch 2]
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: npm test -- --env saucelabs --suites batch2

- name: Run unit tests [Desktop / Batch 3]
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: npm test -- --env saucelabs --suites batch3

- name: Run unit tests [Desktop / Batch 4]
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: npm test -- --env saucelabs --suites batch4

- name: Run unit tests [Desktop / Batch 5]
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: npm test -- --env saucelabs --suites batch5
File renamed without changes.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ To use the Material theme, import the correspondent file from the `theme/materia

## 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-grid` directory, run `polymer test`


Expand Down
10 changes: 4 additions & 6 deletions package-lock-p3.json
Original file line number Diff line number Diff line change
Expand Up @@ -9750,8 +9750,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 @@ -21909,10 +21908,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 @@ -24520,7 +24518,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.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,10 @@
"data-grid",
"data-table"
],
"dependencies": {}
"dependencies": {},
"overrides": {
"wct-sauce": {
"sauce-connect-launcher": "vaadin/sauce-connect-launcher#upgrade-sauce-connect-5"
}
}
}
Loading

0 comments on commit d35d50b

Please sign in to comment.