Skip to content

Bump the storybook group with 13 updates #15762

Bump the storybook group with 13 updates

Bump the storybook group with 13 updates #15762

name: Dashboard Integration Tests
on:
push:
# Only run if dashboard-related files changed.
paths:
- 'babel.config.cjs'
- 'karma-dashboard.config.cjs'
- 'webpack.config.cjs'
- 'webpack.config.test.cjs'
- 'packages/**/*.js'
- 'packages/**/*.ts'
- 'packages/**/*.tsx'
- '**/package.json'
- 'package-lock.json'
- '__static__/**'
branches:
- main
- release/*
pull_request:
# Only run if dashboard-related files changed.
paths:
- 'babel.config.cjs'
- 'karma-dashboard.config.cjs'
- 'webpack.config.cjs'
- 'webpack.config.test.cjs'
- 'packages/**/*.js'
- 'packages/**/*.ts'
- 'packages/**/*.tsx'
- '**/package.json'
- 'package-lock.json'
- '__static__/**'
permissions:
contents: read
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the (target) branch name.
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
karma:
name: Karma
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4
with:
disable-file-monitoring: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
codecov.io:443
fonts.googleapis.com:443
fonts.gstatic.com:443
github.com:443
registry.npmjs.org:443
storage.googleapis.com:443
uploader.codecov.io:443
www.gravatar.com:443
54.185.253.63:443
34.104.35.123:443
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
with:
node-version-file: '.nvmrc'
cache: npm
# TODO: Remove need for `npm install puppeteer`.
- name: Install dependencies
run: |
npm ci
npm install puppeteer
env:
PUPPETEER_PRODUCT: chrome
# FIXME: https://github.com/googleforcreators/web-stories-wp/issues/4364
- name: Increase max number of file watchers
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Get Chromium executable path
id: chromium_path
run: |
CHROMIUM=$(node -p "const puppeteer = require('puppeteer'); puppeteer.executablePath();")
echo "chromium_path=${CHROMIUM}" >> $GITHUB_ENV
- name: Run integration tests
run: npm run test:karma:dashboard -- --headless --viewport=1600:1000 --coverage || npm run test:karma:dashboard:retry-failed -- --headless --viewport=1600:1000
env:
DISABLE_ERROR_BOUNDARIES: true
- name: Upload code coverage report
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
with:
file: build/logs/karma-coverage/dashboard/lcov.info
flags: karmatests
token: ${{ secrets.CODECOV_TOKEN }}