test: test both userscript and extension builds

This commit is contained in:
xenticore
2025-05-01 15:38:51 -04:00
parent 95ce637892
commit 8d8dea0bdc
5 changed files with 11 additions and 5 deletions

View File

@@ -23,8 +23,10 @@ jobs:
id: version
- name: Install dependencies
run: bun install
- name: Test project
run: bun test --define __VERSION__='${{ steps.version.outputs.version }}' --define __EXTENSION_NAME='"tf2wikipricing"'
- name: Test UserScript version
run: bun test --define __VERSION__='${{ steps.version.outputs.version }}' --define __EXTENSION_NAME='"tf2wikipricing"' --define __ENV_USERSCRIPT=1 --define __ENV_WEBEXTENSION=0
- name: Test WebExtension version
run: bun test --define __VERSION__='${{ steps.version.outputs.version }}' --define __EXTENSION_NAME='"tf2wikipricing"' --define __ENV_USERSCRIPT=0 --define __ENV_WEBEXTENSION=1
- name: Build project
run: bun run build
- name: Archive production artifacts

View File

@@ -19,8 +19,10 @@ jobs:
id: version
- name: Install dependencies
run: bun install
- name: Test project
run: bun test --define __VERSION__='${{ steps.version.outputs.version }}' --define __EXTENSION_NAME='"tf2wikipricing"'
- name: Test UserScript version
run: bun test --define __VERSION__='${{ steps.version.outputs.version }}' --define __EXTENSION_NAME='"tf2wikipricing"' --define __ENV_USERSCRIPT=1 --define __ENV_WEBEXTENSION=0
- name: Test WebExtension version
run: bun test --define __VERSION__='${{ steps.version.outputs.version }}' --define __EXTENSION_NAME='"tf2wikipricing"' --define __ENV_USERSCRIPT=0 --define __ENV_WEBEXTENSION=1
- name: Build project
run: bun run build --mode production
- name: Archive production artifacts

BIN
bun.lockb

Binary file not shown.

View File

@@ -1,3 +1,4 @@
import { GlobalRegistrator } from "@happy-dom/global-registrator";
GlobalRegistrator.register();
Object.assign(global, require('jest-chrome'))

View File

@@ -46,6 +46,7 @@
"css-loader": "^7.1.2",
"css-to-string-loader": "^0.1.3",
"extract-loader": "^5.1.0",
"jest-chrome": "^0.8.0",
"jsonc-loader": "^0.1.1",
"mini-css-extract-plugin": "^2.9.2",
"postcss-loader": "^8.1.1",