split tests in multiple workflows

This commit is contained in:
Gauthier Roebroeck 2026-05-04 16:50:42 +08:00
parent 35bf8df0c0
commit 8caf32dd9d
3 changed files with 107 additions and 73 deletions

View file

@ -1,12 +1,16 @@
name: Tests
name: Test Komga
on:
pull_request:
paths-ignore:
- 'komga-webui/src/locales/*'
- 'komga-webui/**'
- 'komga-tray/src/main/resources/org/gotson/komga/*'
- 'next-ui/i18n/*'
- 'next-ui/**'
push:
paths-ignore:
- 'komga-webui/**'
- 'komga-tray/src/main/resources/org/gotson/komga/*'
- 'next-ui/**'
branches-ignore:
- 'dependabot/**'
workflow_dispatch:
@ -18,7 +22,7 @@ jobs:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
fail-fast: false
name: Test server - ${{ matrix.os }}
name: Test Komga - ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Setup Java 21
@ -74,72 +78,3 @@ jobs:
with:
name: conveyor-required-jdk-modules
path: ./output/required-jdk-modules.txt
webui:
runs-on: ubuntu-latest
name: Test webui builds
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: komga-webui/package-lock.json
- name: npm install
working-directory: komga-webui
run: npm install
- name: npm build
working-directory: komga-webui
run: npm run build
env:
NODE_OPTIONS: "--max-old-space-size=4096"
- name: npm test
working-directory: komga-webui
run: npm run test:unit
next-ui:
runs-on: ubuntu-latest
name: Test next-ui
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: next-ui/package-lock.json
- name: npm install
working-directory: next-ui
run: npm ci
- name: Setup Playwright
uses: ./.github/actions/setup-playwright
with:
working-directory: next-ui
- name: test:unit
working-directory: next-ui
run: npm run test:unit
- name: test:storybook
working-directory: next-ui
run: npm run test:storybook
env:
LANG: en_US # fix for https://github.com/microsoft/playwright/issues/34046
- name: lint
working-directory: next-ui
run: npm run lint
- name: prettier
working-directory: next-ui
run: npm run prettier
- name: type-check
working-directory: next-ui
run: npm run type-check
- name: build
working-directory: next-ui
run: npm run build-only

62
.github/workflows/test-nextui.yml vendored Normal file
View file

@ -0,0 +1,62 @@
name: Test NextUI
on:
pull_request:
paths:
- 'next-ui/**'
- '!next-ui/i18n/*'
push:
paths:
- 'next-ui/**'
- '!next-ui/i18n/*'
branches-ignore:
- 'dependabot/**'
workflow_dispatch:
jobs:
next-ui:
runs-on: ubuntu-latest
name: Test next-ui
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: next-ui/package-lock.json
- name: npm install
working-directory: next-ui
run: npm ci
- name: Setup Playwright
uses: ./.github/actions/setup-playwright
with:
working-directory: next-ui
- name: test:unit
working-directory: next-ui
run: npm run test:unit
- name: test:storybook
working-directory: next-ui
run: npm run test:storybook
env:
LANG: en_US # fix for https://github.com/microsoft/playwright/issues/34046
- name: lint
working-directory: next-ui
run: npm run lint
- name: prettier
working-directory: next-ui
run: npm run prettier
- name: type-check
working-directory: next-ui
run: npm run type-check
- name: build
working-directory: next-ui
run: npm run build-only

37
.github/workflows/test-webui.yml vendored Normal file
View file

@ -0,0 +1,37 @@
name: Test WebUI
on:
pull_request:
paths:
- 'komga-webui/**'
- '!komga-webui/src/locales/*'
push:
paths:
- 'komga-webui/**'
- '!komga-webui/src/locales/*'
branches-ignore:
- 'dependabot/**'
workflow_dispatch:
jobs:
webui:
runs-on: ubuntu-latest
name: Test webui
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: komga-webui/package-lock.json
- name: npm install
working-directory: komga-webui
run: npm install
- name: npm build
working-directory: komga-webui
run: npm run build
env:
NODE_OPTIONS: "--max-old-space-size=4096"
- name: npm test
working-directory: komga-webui
run: npm run test:unit