Skip to content

Commit

Permalink
ci: add workflow to test in SauceLabs
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Oct 8, 2020
1 parent dce0c1a commit 6950f67
Showing 1 changed file with 107 additions and 0 deletions.
107 changes: 107 additions & 0 deletions .github/workflows/push.yml
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

0 comments on commit 6950f67

Please sign in to comment.