122 lines
2.6 KiB
YAML
122 lines
2.6 KiB
YAML
name: Validate
|
|
on:
|
|
workflow_call:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
wxt:
|
|
name: WXT
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
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
|
|
|
|
- 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 tsc --noEmit
|
|
pnpm wxt zip
|
|
working-directory: demo
|
|
|
|
- name: Tests
|
|
run: pnpm test:coverage --reporter=default --reporter=hanging-process
|
|
|
|
project-templates:
|
|
name: Project Templates
|
|
runs-on: ubuntu-22.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
|
|
|
|
- name: Build Local Tarball
|
|
run: pnpm pack
|
|
|
|
- name: Validate Vanilla
|
|
working-directory: templates/vanilla
|
|
run: |
|
|
npm i
|
|
npm i -D ../../wxt-*.tgz
|
|
npm ls vite
|
|
npm run build
|
|
npm run compile
|
|
|
|
- name: Validate Vue
|
|
working-directory: templates/vue
|
|
run: |
|
|
npm i
|
|
npm i -D ../../wxt-*.tgz
|
|
npm ls vite
|
|
npm run build
|
|
npm run compile
|
|
|
|
- name: Validate React
|
|
working-directory: templates/react
|
|
run: |
|
|
npm i
|
|
npm i -D ../../wxt-*.tgz
|
|
npm ls vite
|
|
npm run build
|
|
npm run compile
|
|
|
|
- name: Validate Svelte
|
|
working-directory: templates/svelte
|
|
run: |
|
|
npm i
|
|
npm i -D ../../wxt-*.tgz
|
|
npm ls vite
|
|
npm run build
|
|
npm run check
|
|
|
|
- name: Validate Solid
|
|
working-directory: templates/solid
|
|
run: |
|
|
npm i
|
|
npm i -D ../../wxt-*.tgz
|
|
npm ls vite
|
|
npm run build
|
|
npm run compile
|