Skip to content

Commit

Permalink
feat: Run Applitools on public Storybook (#19852)
Browse files Browse the repository at this point in the history
* Test storybook workflow

* Add test workflow

* Fix eof

* Update workflow

* Install apt dependencies

* Schedule nightly

* Enhance workflow

* Add secret Applitools key

* Update config

* Add batchName
  • Loading branch information
geido authored May 9, 2022
1 parent f144de4 commit c3ba86e
Show file tree
Hide file tree
Showing 4 changed files with 9,500 additions and 6,633 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/superset-applitools-storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Applitools Storybook

on:
schedule:
- cron: "0 0 * * *"

env:
APPLITOOLS_APP_NAME: Superset
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
APPLITOOLS_BATCH_ID: ${{ github.sha }}
APPLITOOLS_BATCH_NAME: Superset Storybook

jobs:
cron:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16]
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
- name: Install Chrome-related packages
run: sudo apt-get update -y && sudo apt-get -y install gconf-service ca-certificates libxshmfence-dev fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libglib2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libnss3 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release xdg-utils libappindicator1
- name: Install NPM dependencies
working-directory: ./superset-frontend
run: |
npm ci
ls ./node_modules/puppeteer/.local-chromium
- name: Run Applitools Eyes-Storybook
working-directory: ./superset-frontend
run: npx eyes-storybook -u https://superset-storybook.netlify.app/
27 changes: 27 additions & 0 deletions superset-frontend/applitools.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
module.exports = {
apiKey: process.env.APPLITOOLS_API_KEY,
batchId: process.env.APPLITOOLS_BATCH_ID,
batchName: process.env.APPLITOOLS_BATCH_NAME,
puppeteerOptions: {
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox'],
},
};
Loading

0 comments on commit c3ba86e

Please sign in to comment.