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 #64

Merged
merged 27 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6f9fb17
chore: do not ignore package-lock.json
web-padawan Jan 11, 2022
4cdded7
chore: add package-lock.json for Polymer 2
web-padawan Jan 11, 2022
82c87de
chore: use Node 16 for Polymer 2 build
web-padawan Jan 11, 2022
c2cf16d
chore: add package-lock.json for Polymer 3
web-padawan Jan 11, 2022
dadff0a
chore: use Node 16 for Polymer 3 build
web-padawan Jan 11, 2022
122941d
chore: update components-dev-dependencies
web-padawan Jan 11, 2022
a7aff97
chore: downgrade to Node 12 to run WCT
web-padawan Jan 11, 2022
8a23e40
chore: try using Node 16 for Polymer 3 only
web-padawan Jan 11, 2022
bb28294
chore: update dev dependencies, use latest npm
web-padawan Jan 11, 2022
7e2e539
chore: set verbose WCT flag to true
web-padawan Jan 11, 2022
3932935
chore: remove coverage plugin config
web-padawan Jan 11, 2022
ffbf794
chore: add npm install stept for P3
web-padawan Jan 11, 2022
a5f39b9
chore: use npm ci to install deps
web-padawan Jan 11, 2022
784bc75
chore: install magi-cli@next globally
web-padawan Jan 11, 2022
a7b836e
chore: run wct correctly for Polymer 3
web-padawan Jan 11, 2022
a18ab49
chore: use npm overrides to pin wct-local
web-padawan Jan 11, 2022
789f357
chore: check which launchpad is used
web-padawan Jan 11, 2022
4cf957c
chore: try nested overrides syntax
web-padawan Jan 11, 2022
5ed77a2
chore: try to pin launchpad directly
web-padawan Jan 11, 2022
2cef916
chore: patch wct-local for debugging
web-padawan Jan 11, 2022
936e07f
chore: try using overrides with fork
web-padawan Jan 11, 2022
190307d
chore: update launchpad in lockfile for testing
web-padawan Jan 11, 2022
fde3ddf
chore: cleanup debug build steps
web-padawan Jan 11, 2022
01e7b68
chore: align Node and npm setup steps
web-padawan Jan 11, 2022
bdf90ea
chore: remove unnecessary install step
web-padawan Jan 11, 2022
3b22576
chore: revert changes to wct.conf.js
web-padawan Jan 11, 2022
baf4d46
chore: update package-lock.json
web-padawan Jan 12, 2022
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
28 changes: 14 additions & 14 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ jobs:
- 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
# web-component-tester is needed to run the test step
run: "npm install --quiet --no-progress --global bower polymer-cli web-component-tester"
run: "npm install --quiet --no-progress --global bower polymer-cli"

- name: Install project npm dependencies
run: "npm install --quiet --no-progress"
run: "npm ci"

- name: Install project Bower dependencies
run: "bower install --quiet"
Expand All @@ -36,7 +39,7 @@ jobs:

# 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' wct"
run: "xvfb-run -s '-screen 0 1024x768x24' npm test"

unit-tests-p3:
name: Polymer 3 on SauceLabs
Expand All @@ -50,29 +53,26 @@ jobs:
- 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
# magi-cli, bower and polymer-modulizer are needed to run the Polymer 3 conversion step
# web-component-tester is needed to run the test step
run: "npm install --quiet --no-progress --global bower magi-cli web-component-tester polymer-modulizer"
# 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: 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

# Using yarn instead of npm here to check that the dependency tree does not have two
# versions of the same component. With P2 / Bower that is checked automatically, but
# with P3 / npm it is not.
- name: Install project npm dependencies
run: "yarn install --flat"

# 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 on SauceLabs
run: "wct --npm --env saucelabs"
run: "npm test -- --env saucelabs"
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
6 changes: 5 additions & 1 deletion .github/workflows/visual-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ jobs:
- 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'
# 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 project npm dependencies
run: "npm install --quiet --no-progress"
run: "npm ci"

- name: Install project Bower dependencies
run: "bower install --quiet"
Expand Down
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.

Loading