Merge branch 'master' into feature/local-service-monitor
This commit is contained in:
commit
b33188ebfe
49
.github/workflows/auto-test.yml
vendored
49
.github/workflows/auto-test.yml
vendored
@ -15,7 +15,7 @@ on:
|
||||
|
||||
jobs:
|
||||
auto-test:
|
||||
needs: [ check-linters ]
|
||||
needs: [ e2e-test ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 15
|
||||
|
||||
@ -33,6 +33,13 @@ jobs:
|
||||
- run: git config --global core.autocrlf false # Mainly for Windows
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Cache/Restore node_modules
|
||||
uses: actions/cache@v4
|
||||
id: node-modules-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
@ -46,7 +53,7 @@ jobs:
|
||||
|
||||
# As a lot of dev dependencies are not supported on ARMv7, we have to test it separately and just test if `npm ci --production` works
|
||||
armv7-simple-test:
|
||||
needs: [ ]
|
||||
needs: [ e2e-test ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 15
|
||||
if: ${{ github.repository == 'louislam/uptime-kuma' }}
|
||||
@ -60,11 +67,18 @@ jobs:
|
||||
- run: git config --global core.autocrlf false # Mainly for Windows
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Cache/Restore node_modules
|
||||
uses: actions/cache@v4
|
||||
id: node-modules-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: npm ci --production
|
||||
- run: npm install --production
|
||||
|
||||
check-linters:
|
||||
runs-on: ubuntu-latest
|
||||
@ -73,6 +87,13 @@ jobs:
|
||||
- run: git config --global core.autocrlf false # Mainly for Windows
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Cache/Restore node_modules
|
||||
uses: actions/cache@v4
|
||||
id: node-modules-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- name: Use Node.js 20
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
@ -81,17 +102,29 @@ jobs:
|
||||
- run: npm run lint:prod
|
||||
|
||||
e2e-test:
|
||||
needs: [ ]
|
||||
runs-on: ubuntu-24.04-arm
|
||||
needs: [ check-linters ]
|
||||
runs-on: ARM64
|
||||
env:
|
||||
PLAYWRIGHT_VERSION: ~1.39.0
|
||||
steps:
|
||||
- run: git config --global core.autocrlf false # Mainly for Windows
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js 20
|
||||
- name: Cache/Restore node_modules
|
||||
uses: actions/cache@v4
|
||||
id: node-modules-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
- run: npm install
|
||||
- run: npx playwright install
|
||||
|
||||
- name: Install Playwright ${{ env.PLAYWRIGHT_VERSION }}
|
||||
run: npx playwright@${{ env.PLAYWRIGHT_VERSION }} install
|
||||
|
||||
- run: npm run build
|
||||
- run: npm run test-e2e
|
||||
|
||||
1
.github/workflows/close-incorrect-issue.yml
vendored
1
.github/workflows/close-incorrect-issue.yml
vendored
@ -20,6 +20,5 @@ jobs:
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: node extra/close-incorrect-issue.js ${{ secrets.GITHUB_TOKEN }} ${{ github.event.issue.number }} ${{ github.event.issue.user.login }}
|
||||
|
||||
@ -142,27 +142,23 @@ async function sendAPIKeyList(socket) {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async function sendInfo(socket, hideVersion = false) {
|
||||
let version;
|
||||
let latestVersion;
|
||||
let isContainer;
|
||||
let dbType;
|
||||
|
||||
if (!hideVersion) {
|
||||
version = checkVersion.version;
|
||||
latestVersion = checkVersion.latestVersion;
|
||||
isContainer = (process.env.UPTIME_KUMA_IS_CONTAINER === "1");
|
||||
dbType = Database.dbConfig.type;
|
||||
}
|
||||
|
||||
socket.emit("info", {
|
||||
version,
|
||||
latestVersion,
|
||||
isContainer,
|
||||
dbType,
|
||||
const info = {
|
||||
primaryBaseURL: await setting("primaryBaseURL"),
|
||||
serverTimezone: await server.getTimezone(),
|
||||
serverTimezoneOffset: server.getTimezoneOffset(),
|
||||
});
|
||||
};
|
||||
if (!hideVersion) {
|
||||
info.version = checkVersion.version;
|
||||
info.latestVersion = checkVersion.latestVersion;
|
||||
info.isContainer = (process.env.UPTIME_KUMA_IS_CONTAINER === "1");
|
||||
info.dbType = Database.dbConfig.type;
|
||||
info.runtime = {
|
||||
platform: process.platform, // linux or win32
|
||||
arch: process.arch, // x86 or arm
|
||||
};
|
||||
}
|
||||
|
||||
socket.emit("info", info);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -53,7 +53,7 @@ test.describe("Monitor Form", () => {
|
||||
|
||||
const friendlyName = "Example DNS NS";
|
||||
await page.getByTestId("friendly-name-input").fill(friendlyName);
|
||||
await page.getByTestId("hostname-input").fill("example.com");
|
||||
await page.getByTestId("hostname-input").fill("kuma.pet");
|
||||
|
||||
const resolveTypeSelect = page.getByTestId("resolve-type-select");
|
||||
await resolveTypeSelect.click();
|
||||
@ -65,9 +65,9 @@ test.describe("Monitor Form", () => {
|
||||
await page.getByTestId("add-condition-button").click();
|
||||
expect(await page.getByTestId("condition").count()).toEqual(2); // 2 explicitly added
|
||||
|
||||
await page.getByTestId("condition-value").nth(0).fill("a.iana-servers.net");
|
||||
await page.getByTestId("condition-value").nth(0).fill("carl.ns.cloudflare.com");
|
||||
await page.getByTestId("condition-and-or").nth(0).selectOption("or");
|
||||
await page.getByTestId("condition-value").nth(1).fill("b.iana-servers.net");
|
||||
await page.getByTestId("condition-value").nth(1).fill("jean.ns.cloudflare.com");
|
||||
|
||||
await screenshot(testInfo, page);
|
||||
await page.getByTestId("save-button").click();
|
||||
@ -86,7 +86,7 @@ test.describe("Monitor Form", () => {
|
||||
|
||||
const friendlyName = "Example DNS NS";
|
||||
await page.getByTestId("friendly-name-input").fill(friendlyName);
|
||||
await page.getByTestId("hostname-input").fill("example.com");
|
||||
await page.getByTestId("hostname-input").fill("kuma.pet");
|
||||
|
||||
const resolveTypeSelect = page.getByTestId("resolve-type-select");
|
||||
await resolveTypeSelect.click();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user