98 lines
2.0 KiB
YAML
98 lines
2.0 KiB
YAML
name: Validate
|
|
on:
|
|
workflow_call:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
wxt:
|
|
name: WXT
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup PNPM
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 8
|
|
|
|
- name: Setup NodeJS
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pnpm install --ignore-scripts
|
|
pnpm build
|
|
pnpm install
|
|
|
|
- name: Formatting
|
|
run: pnpm format:check
|
|
|
|
- name: Type Check
|
|
run: pnpm compile
|
|
|
|
- name: Build Demo
|
|
run: |
|
|
pnpm build:all:chrome-mv2
|
|
pnpm build:all:chrome-mv3
|
|
pnpm build:all:firefox-mv2
|
|
pnpm build:all:firefox-mv3
|
|
pnpm compile
|
|
pnpm zip
|
|
working-directory: demo
|
|
|
|
- name: Tests
|
|
run: pnpm test:coverage --reporter=default --reporter=hanging-process
|
|
|
|
project-templates:
|
|
name: Project Templates
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup PNPM
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 8
|
|
|
|
- name: Setup NodeJS
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'pnpm'
|
|
|
|
- name: Validate Vanilla
|
|
working-directory: templates/vanilla
|
|
run: |
|
|
npm i
|
|
npm run build
|
|
npm run compile
|
|
|
|
- name: Validate Vue
|
|
working-directory: templates/vue
|
|
run: |
|
|
npm i
|
|
npm run build
|
|
npm run compile
|
|
|
|
- name: Validate React
|
|
working-directory: templates/react
|
|
run: |
|
|
npm i
|
|
npm run build
|
|
npm run compile
|
|
|
|
- name: Validate Svelte
|
|
working-directory: templates/svelte
|
|
run: |
|
|
npm i
|
|
npm run build
|
|
npm run check
|