1
0
mirror of synced 2026-01-01 09:04:46 -05:00
Files
docs/.github/workflows/browser-test.yml
Peter Bengtsson 038fc886ba only run browser tests when JS is changing (#23080)
* only run browser tests when JS is changing

Part of #1246

* ugh typo

* try this

* tidying up
2021-11-30 22:09:58 +00:00

54 lines
1.6 KiB
YAML

name: Browser Tests
# **What it does**: This runs our browser tests on pull requests.
# **Why we have it**: This is the only way we currently test our browser JavaScript.
# **Who does it impact**: Docs engineering, open-source engineering contributors.
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths:
- '**.js'
- '**.mjs'
- '**.ts'
- '**.tsx'
- jest.config.js
- package.json
# In case something like eslint or tsc or prettier upgrades
- package-lock.json
# Ultimately, for debugging this workflow itself
- .github/workflows/browser-test.yml
jobs:
build:
runs-on: ubuntu-latest
steps:
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
# Even if if doesn't do anything
- name: Checkout
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.13.x
cache: npm
- name: Install dependencies
env:
# This makes it so the puppeteer npm package doesn't bother
# to download a copy of chromium because it can use
# `$PUPPETEER_EXECUTABLE_PATH` from the ubuntu Action container.
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
run: npm ci --include=optional
- name: Run browser-test
run: npm run browser-test