chore: Fix and enhance Applitools workflows (#20071)

* Enhance workflow

* Fix failing workflow

* Enhance storybook with cached-dependencies
This commit is contained in:
Geido 2022-05-16 14:26:38 +02:00 committed by GitHub
parent 4435e53901
commit 67d4318784
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 13 deletions

View File

@ -213,6 +213,12 @@ cypress-run-all() {
kill $flaskProcessId
}
eyes-storybook-dependencies() {
say "::group::install eyes-storyook dependencies"
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
say "::endgroup::"
}
cypress-run-applitools() {
local flasklog="${HOME}/flask.log"
local port=8081

View File

@ -6,7 +6,7 @@ on:
jobs:
cypress-applitools:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
@ -36,7 +36,12 @@ jobs:
ports:
- 16379:6379
steps:
- uses: actions/checkout@v3
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: recursive
ref: master
- name: Setup Python
uses: actions/setup-python@v2
with:
@ -59,8 +64,8 @@ jobs:
uses: ./.github/actions/cached-dependencies
with:
run: testdata
- name: Set up Node.js
uses: actions/setup-node@v3.1.1
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install npm dependencies
@ -75,7 +80,7 @@ jobs:
uses: ./.github/actions/cached-dependencies
with:
run: cypress-install
- name: Run Applitools Cypress
- name: Run Cypress
uses: ./.github/actions/cached-dependencies
env:
CYPRESS_BROWSER: ${{ matrix.browser }}

View File

@ -12,23 +12,29 @@ env:
jobs:
cron:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
node: [16]
steps:
- uses: actions/checkout@v3
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: recursive
ref: master
- 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 eyes-storybook dependencies
uses: ./.github/actions/cached-dependencies
with:
run: eyes-storybook-dependencies
- name: Install NPM dependencies
working-directory: ./superset-frontend
run: |
npm ci
ls ./node_modules/puppeteer/.local-chromium
uses: ./.github/actions/cached-dependencies
with:
run: npm-install
- name: Run Applitools Eyes-Storybook
working-directory: ./superset-frontend
run: npx eyes-storybook -u https://superset-storybook.netlify.app/