mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 23:04:04 +00:00
Compare commits
6 commits
9befdd70cc
...
cb26b79498
Author | SHA1 | Date | |
---|---|---|---|
|
cb26b79498 | ||
|
dd5347b25e | ||
|
733ce8ded5 | ||
|
16225acdbd | ||
|
5dce44277f | ||
|
c19eef9e04 |
3 changed files with 16 additions and 2 deletions
2
.github/workflows/auto-test.yml
vendored
2
.github/workflows/auto-test.yml
vendored
|
@ -78,7 +78,7 @@ jobs:
|
|||
|
||||
e2e-test:
|
||||
needs: [ ]
|
||||
runs-on: ARM64
|
||||
runs-on: e2e
|
||||
steps:
|
||||
- run: git config --global core.autocrlf false # Mainly for Windows
|
||||
- uses: actions/checkout@v4
|
||||
|
|
12
extra/test-backend.mjs
Normal file
12
extra/test-backend.mjs
Normal file
|
@ -0,0 +1,12 @@
|
|||
// If Node.js >= 22, run `npm run test-backend-node22`, otherwise run `npm run test-backend-node20`
|
||||
import * as childProcess from "child_process";
|
||||
|
||||
const version = parseInt(process.version.slice(1));
|
||||
|
||||
console.log(`Node.js version: ${version}`);
|
||||
|
||||
if (version >= 22) {
|
||||
childProcess.execSync("npm run test-backend-node22", { stdio: "inherit" });
|
||||
} else {
|
||||
childProcess.execSync("npm run test-backend-node20", { stdio: "inherit" });
|
||||
}
|
|
@ -27,7 +27,9 @@
|
|||
"build": "vite build --config ./config/vite.config.js",
|
||||
"test": "npm run test-backend && npm run test-e2e",
|
||||
"test-with-build": "npm run build && npm test",
|
||||
"test-backend": "cross-env TEST_BACKEND=1 node --test test/backend-test",
|
||||
"test-backend": "node extra/test-backend.mjs",
|
||||
"test-backend-node20": "cross-env TEST_BACKEND=1 node --test test/backend-test",
|
||||
"test-backend-node22": "cross-env TEST_BACKEND=1 node --test test/backend-test/test-*.js && node --test test/backend-test/**/test-*.js",
|
||||
"test-e2e": "playwright test --config ./config/playwright.config.js",
|
||||
"test-e2e-ui": "playwright test --config ./config/playwright.config.js --ui --ui-port=51063",
|
||||
"playwright-codegen": "playwright codegen localhost:3000 --save-storage=./private/e2e-auth.json",
|
||||
|
|
Loading…
Reference in a new issue