Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,38 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm test --coverage

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v6
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Upload build artifact
uses: actions/upload-artifact@v7
with:
name: dist
path: dist

webext-linter:
name: Webext Linting
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v6
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download build artifact
uses: actions/download-artifact@v7
with:
name: dist
path: dist
- name: Run webext-linter
run: pnpm lint:webext
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ node_modules
dist
coverage

# webext-linter caches
.schema-cache
.lib-mozilla-hash-db-cache
.lib-cdn-lookup-cache
.experiments-cache

# scripts and config
deploy.sh

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"format:check": "prettier --check \"src/**/*.{js,vue,css}\" \"test/**/*.js\" vite.config.js vitest.config.js",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage"
"test:coverage": "vitest run --coverage",
"lint:webext": "zip -q -r sca-source.zip . -x 'dist/*' -x 'node_modules/*' -x '.git/*' -x '*.sh' -x '*.xpi' -x '*.zip' -x 'coverage/*' -x 'test/*' -x '.schema-cache/*' -x '.lib-mozilla-hash-db-cache/*' -x '.lib-cdn-lookup-cache/*' -x '.experiments-cache/*' && webext-linter dist --sca-root sca-source.zip --checks-skip obfuscated-code"
},
"packageManager": "pnpm@11.22.0",
"dependencies": {
Expand All @@ -22,6 +23,7 @@
"vue-i18n": "^11.4.8"
},
"devDependencies": {
"@thunderbirdops/webext-linter": "github:thunderbird/webext-linter",
"@vitejs/plugin-vue": "^6.0.8",
"@vitest/coverage-v8": "^4.1.11",
"oxlint": "^1.79.0",
Expand Down
Loading