Simplify and cleanup CSS and improve initial load performance #468
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: Build & Lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: | |
- 20.x | |
steps: | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm set cache ~/.npm && npm ci | |
- name: Build | |
run: npm run build | |
- name: Lint | |
run: npm run lint | |
- name: Save build folder | |
uses: actions/upload-artifact@v4 | |
with: | |
name: popup | |
path: popup | |
if-no-files-found: error | |
cypress-run-chrome: | |
runs-on: ubuntu-22.04 | |
container: | |
image: cypress/browsers:latest | |
options: --user 1001 | |
name: E2E Testing (Chrome) | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download the build folder | |
uses: actions/download-artifact@v4 | |
with: | |
name: popup | |
path: popup | |
- uses: cypress-io/github-action@v6 | |
with: | |
browser: chrome | |
start: npm start | |
wait-on: http://localhost:8080 | |
cypress-run-firefox: | |
name: E2E Testing (Firefox) | |
runs-on: ubuntu-22.04 | |
container: | |
image: cypress/browsers:latest | |
options: --user 1001 | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download the build folder | |
uses: actions/download-artifact@v4 | |
with: | |
name: popup | |
path: popup | |
- name: Cypress run | |
uses: cypress-io/github-action@v6 | |
with: | |
browser: firefox | |
start: npm start | |
wait-on: http://localhost:8080 | |
cypress-run-edge: | |
name: E2E Testing (Edge) | |
runs-on: windows-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download the build folder | |
uses: actions/download-artifact@v4 | |
with: | |
name: popup | |
path: popup | |
- name: Cypress run | |
uses: cypress-io/github-action@v6 | |
with: | |
browser: edge | |
build: npm run build | |
start: npm start | |
wait-on: http://localhost:8080 |