Skip to content

Drop the serve dev dependency #4065

Drop the serve dev dependency

Drop the serve dev dependency #4065

Workflow file for this run

name: Unit tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
browser: ['chrome', 'firefox']
node-version: [22.x, 24.x,]
steps:
- name: Harden Runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install latest Chrome
run: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get --only-upgrade install google-chrome-stable
google-chrome --version
- name: Install Firefox
uses: browser-actions/setup-firefox@fcf821c621167805dd63a29662bd7cb5676c81a8 # latest
with:
firefox-version: '149.0'
- name: Install Browsertime
run: npm ci
- name: Run unit tests
run: BROWSER=${{ matrix.browser }} npm test
#uses: GabrielBB/xvfb-action@v1.6
#with:
# run: BROWSER=${{ matrix.browser }} npm test