- Perf-Dashboard.Render sync phase sets location.hash, but the actual DOM (#488) - Add icons to developer mode selection buttons (#493) - Update github workloads (#478) - Score math: Add legend for variables (#490) - Use WakeLock (#491) - Release/3.1 - merge 428 (add id to input) (#484) Change-Id: I9f83afd0b62bc4e2dcc74e2363d5ab732d1f918a
75 lines
2.2 KiB
YAML
75 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
linters:
|
|
name: Linters
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout Branch
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: "package.json"
|
|
cache: "npm"
|
|
|
|
- name: Install Node Packages
|
|
run: npm ci
|
|
|
|
- name: Run linters
|
|
run: npm run format
|
|
|
|
- name: Check if anything changed
|
|
run: |
|
|
git_status="`LC_ALL=C git status --porcelain --ignore-submodules -unormal 2>&1`"
|
|
if [ -n "$git_status" ]; then
|
|
printf "Some file(s) changed as the result of formatting, this means that you need to run the formatter on your patch.\n"
|
|
printf "Here is what changed:\n"
|
|
printf -- "$git_status\n\n"
|
|
printf "And here is the diff:\n"
|
|
git diff -U8
|
|
exit 1
|
|
fi
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: macos-latest
|
|
strategy:
|
|
matrix:
|
|
browser: [chrome, firefox, safari]
|
|
steps:
|
|
- name: Install Firefox
|
|
if: ${{ matrix.browser == 'firefox' }}
|
|
run: brew install --cask firefox
|
|
|
|
- name: Checkout Branch
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: "package.json"
|
|
cache: "npm"
|
|
|
|
- name: Install Node Packages
|
|
run: npm ci
|
|
|
|
- name: Run Unit Tests
|
|
run: |
|
|
echo "Running in $BROWSER"
|
|
npm run test:${{ matrix.browser }}
|
|
|
|
- name: Run end2end Tests
|
|
run: |
|
|
echo "Running in $BROWSER"
|
|
npm run test-e2e:${{ matrix.browser }}
|