feat: Run Applitools on public Storybook (#19852)
* 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
This commit is contained in:
parent
f144de4ee2
commit
c3ba86ecc5
|
|
@ -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/setup-node@v3.1.1
|
||||||
|
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/
|
||||||
|
|
@ -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'],
|
||||||
|
},
|
||||||
|
};
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -204,6 +204,7 @@
|
||||||
"yargs": "^15.4.1"
|
"yargs": "^15.4.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@applitools/eyes-storybook": "^3.27.6",
|
||||||
"@babel/cli": "^7.16.0",
|
"@babel/cli": "^7.16.0",
|
||||||
"@babel/compat-data": "^7.15.0",
|
"@babel/compat-data": "^7.15.0",
|
||||||
"@babel/core": "^7.15.5",
|
"@babel/core": "^7.15.5",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue