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: add lockfiles to ensure consistent builds in CI #2205

Merged
merged 3 commits into from
Jan 20, 2022
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
67 changes: 38 additions & 29 deletions .github/workflows/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,33 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Set up Node 12.x
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 12.x

- name: Install CLI tools
run: npm install -g bower
- name: Check out the source code
uses: actions/checkout@v2

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

- name: Install Bower
run: bower -q i
- name: Install global npm dependencies
# bower is needed to run 'bower install'
run: "npm install --quiet --no-progress --global bower"

- name: Check version
run: npm run check
- name: Install project npm dependencies
run: "npm ci"

- name: Run linters
run: npm run lint
- 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"

- name: Run unit tests
run: xvfb-run -s '-screen 0 1024x768x24' npm test
Expand All @@ -37,26 +45,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: |
git config user.name github-actions
git config user.email github-actions@github.com

- uses: actions/setup-node@v1
- name: Set up Node 12.x
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 12.x

- name: Install CLI tools
run: npm install -g bower magi-cli polymer-modulizer web-component-tester yarn
- name: Check out the (Polymer 2) source code
uses: actions/checkout@v2

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

- name: Convert to P3
run: magi p3-convert --out . --import-style=name
- 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@next polymer-modulizer"

- name: Run yarn
run: yarn install --flat
- 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

- name: Run unit tests
run: xvfb-run -s '-screen 0 1024x768x24' wct --npm
run: xvfb-run -s '-screen 0 1024x768x24' npm test
26 changes: 17 additions & 9 deletions .github/workflows/sauce-p2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Set up Node 12.x
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 12.x

- name: Install CLI tools
run: npm install -g bower
- name: Check out the source code
uses: actions/checkout@v2

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

- name: Install Bower
run: bower -q i
- name: Install global npm dependencies
# bower is needed to run 'bower install'
run: "npm install --quiet --no-progress --global bower"

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

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

- name: Run unit tests [Desktop / Batch 1]
env:
Expand Down
41 changes: 21 additions & 20 deletions .github/workflows/sauce-p3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,54 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: |
git config user.name github-actions
git config user.email github-actions@github.com

- uses: actions/setup-node@v1
- name: Set up Node 12.x
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 12.x

- name: Install CLI tools
run: npm install -g bower magi-cli polymer-modulizer web-component-tester yarn
- name: Check out the (Polymer 2) source code
uses: actions/checkout@v2

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

- name: Convert to P3
run: magi p3-convert --out . --import-style=name
- 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@next polymer-modulizer"

- name: Run yarn
run: yarn install --flat
- 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

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

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

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

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

- name: Run unit tests [Desktop / Batch 5]
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: wct --npm --env saucelabs:desktop --suites batch5
run: npm test -- --env saucelabs:desktop --suites batch5
40 changes: 28 additions & 12 deletions .github/workflows/sauce-visual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,41 @@ on: [push]

jobs:
visual-tests:
name: Polymer 2 on SauceLabs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Set up Node 12.x
uses: actions/setup-node@v2
with:
node-version: 12
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 CLI tools
run: npm install -g bower gemini gemini-sauce gemini-polyserve
- name: Install global npm dependencies
# bower is needed to run 'bower install'
# gemini is needed to run the visual tests step
run: "npm install --quiet --no-progress --global bower gemini@^4.0.0 gemini-sauce gemini-polyserve"

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

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

- name: Run visual tests
- name: Run visual tests on SauceLabs
run: "gemini test --reporter html --reporter flat test/visual"
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: gemini test test/visual

- name: Publish the Visual Tests failures report as an Artifact for this Workflow run
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: Visual tests failures report
path: gemini-report/
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
bower_components
node_modules
package-lock.json
yarn.lock
coverage
analysis.json
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

37 changes: 18 additions & 19 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,6 @@
"package-lock.json",
"wct.conf.js"
],
"devDependencies": {
"webcomponentsjs": "1.2.0",
"web-component-tester": "^6.1.5",
"sinonjs": "Polymer/sinon.js#^1.14.1",
"iron-test-helpers": "^v2.0.0",
"paper-input": "^v2.0.0",
"paper-checkbox": "^v2.0.0",
"iron-flex-layout": "^v2.0.0",
"iron-image": "^v2.0.0",
"paper-slider": "^v2.0.0",
"iron-media-query": "^v2.0.0",
"iron-component-page": "^3.0.0",
"iron-ajax": "PolymerElements/iron-ajax#^v2.0.0",
"app-localize-behavior": "^v2.0.0",
"iron-list": "^v2.0.4",
"vaadin-demo-helpers": "vaadin/vaadin-demo-helpers#^3.1.0",
"vaadin-button": "vaadin/vaadin-button#^2.4.0",
"vaadin-context-menu": "vaadin/vaadin-context-menu#^4.5.0"
},
"dependencies": {
"polymer": "^2.0.0",
"iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^v2.0.0",
Expand All @@ -80,5 +61,23 @@
"vaadin-lumo-styles": "vaadin/vaadin-lumo-styles#^1.6.0",
"vaadin-material-styles": "vaadin/vaadin-material-styles#^1.3.2",
"vaadin-element-mixin": "vaadin/vaadin-element-mixin#^2.4.1"
},
"devDependencies": {
"app-localize-behavior": "^v2.0.0",
"iron-ajax": "PolymerElements/iron-ajax#^v2.0.0",
"iron-component-page": "^3.0.0",
"iron-image": "^v2.0.0",
"iron-list": "^v2.0.4",
"iron-media-query": "^v2.0.0",
"iron-test-helpers": "^v2.0.0",
"paper-checkbox": "^v2.0.0",
"paper-input": "^v2.0.0",
"paper-slider": "^v2.0.0",
"test-fixture": "PolymerElements/test-fixture#^3.0.0",
"vaadin-button": "vaadin/vaadin-button#^2.4.0",
"vaadin-context-menu": "vaadin/vaadin-context-menu#^4.5.0",
"vaadin-demo-helpers": "vaadin/vaadin-demo-helpers#^3.1.0",
"webcomponentsjs": "1.2.0",
"web-component-tester": "^6.1.5"
}
}
Loading