Skip to content

Workflow file for this run

name: CI Lint, Build & Test
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**.md'
- '**.txt'
pull_request:
paths-ignore:
- '**.md'
- '**.txt'
jobs:
web-ext-lint:
name: "Web Ext Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "web-ext lint"
run: |
cd src
npm exec web-ext lint --verbose
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install
run: npm ci
- name: Lint
run: npm run lint
test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Chrome package
run: npm run build
- name: Build Firefox package
run: npm run build:firefox
- name: Run tests
env:
CI: true
run: npm test
- name: Upload Chrome artifact
uses: actions/upload-artifact@v4
with:
name: dist-chrome.zip
path: src/dist/chrome/*
if-no-files-found: error
- name: Upload Firefox artifact
uses: actions/upload-artifact@v4
with:
name: dist-firefox.xpi
path: src/dist/firefox/*
if-no-files-found: error