-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add workflow to test in SauceLabs
- Loading branch information
1 parent
dce0c1a
commit 6950f67
Showing
1 changed file
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
name: push | ||
|
||
on: [push] | ||
|
||
jobs: | ||
polymer-2: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-polymer-2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install CLI tools | ||
run: npm install -g bower polymer-cli web-component-tester | ||
|
||
- name: Install dependencies | ||
run: npm -q i | ||
|
||
- name: Install Bower | ||
run: bower -q i | ||
|
||
- name: Run unit tests | ||
env: | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
run: wct --env saucelabs | ||
|
||
polymer-3: | ||
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 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-polymer-3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install CLI tools | ||
run: npm install -g bower magi-cli polymer-modulizer web-component-tester yarn | ||
|
||
- name: Install dependencies | ||
run: npm -q i | ||
|
||
- name: Convert to P3 | ||
run: magi p3-convert --out . --import-style=name | ||
|
||
- name: Run yarn | ||
run: yarn install --flat | ||
|
||
- name: Run unit tests | ||
env: | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
run: wct --npm --env saucelabs | ||
|
||
visual-tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-polymer-2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install CLI tools | ||
run: npm install -g bower gemini gemini-sauce gemini-polyserve | ||
|
||
- name: Install dependencies | ||
run: npm -q i | ||
|
||
- name: Install Bower | ||
run: bower -q i | ||
|
||
- name: Visual tests | ||
env: | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
run: gemini test test/visual |