Skip to content

Commit

Permalink
chore: Fix and enhance Applitools workflows (apache#20071)
Browse files Browse the repository at this point in the history
* Enhance workflow

* Fix failing workflow

* Enhance storybook with cached-dependencies
  • Loading branch information
geido authored and philipher29 committed Jun 9, 2022
1 parent 6d88a05 commit 8e6ccbd
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/bashlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/superset-applitool-cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
cypress-applitools:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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 }}
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/superset-applitools-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/

0 comments on commit 8e6ccbd

Please sign in to comment.