You've already forked tf2wikipricing
test: test both userscript and extension builds
This commit is contained in:
@@ -23,8 +23,10 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install
|
run: bun install
|
||||||
- name: Test project
|
- name: Test UserScript version
|
||||||
run: bun test --define __VERSION__='${{ steps.version.outputs.version }}' --define __EXTENSION_NAME='"tf2wikipricing"'
|
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
|
- name: Build project
|
||||||
run: bun run build
|
run: bun run build
|
||||||
- name: Archive production artifacts
|
- name: Archive production artifacts
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install
|
run: bun install
|
||||||
- name: Test project
|
- name: Test UserScript version
|
||||||
run: bun test --define __VERSION__='${{ steps.version.outputs.version }}' --define __EXTENSION_NAME='"tf2wikipricing"'
|
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
|
- name: Build project
|
||||||
run: bun run build --mode production
|
run: bun run build --mode production
|
||||||
- name: Archive production artifacts
|
- name: Archive production artifacts
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
import { GlobalRegistrator } from "@happy-dom/global-registrator";
|
import { GlobalRegistrator } from "@happy-dom/global-registrator";
|
||||||
|
|
||||||
GlobalRegistrator.register();
|
GlobalRegistrator.register();
|
||||||
|
Object.assign(global, require('jest-chrome'))
|
||||||
@@ -46,6 +46,7 @@
|
|||||||
"css-loader": "^7.1.2",
|
"css-loader": "^7.1.2",
|
||||||
"css-to-string-loader": "^0.1.3",
|
"css-to-string-loader": "^0.1.3",
|
||||||
"extract-loader": "^5.1.0",
|
"extract-loader": "^5.1.0",
|
||||||
|
"jest-chrome": "^0.8.0",
|
||||||
"jsonc-loader": "^0.1.1",
|
"jsonc-loader": "^0.1.1",
|
||||||
"mini-css-extract-plugin": "^2.9.2",
|
"mini-css-extract-plugin": "^2.9.2",
|
||||||
"postcss-loader": "^8.1.1",
|
"postcss-loader": "^8.1.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user