mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-24 23:05:01 +03:00
e8feb9d641
Eight Postgres-only tests skipped everywhere because no workflow named them. The durable-first job now runs the service and outbound ones, and a scratch-database job runs the migration tests that drop their own tables. Every Postgres step counts top-level passes, so a renamed test cannot leave a step green. A shell-lint job runs actionlint on the workflows and shellcheck on the shipped scripts (the legacy installers at error severity), golangci-lint is pinned, and both the codegen job and make verify fail when docs/public/openapi.json drifts from the panel's spec; docs-ci also fails on a stale API reference. npm audit moves to its own script outside make verify, since it depends on the network.
70 lines
1.6 KiB
YAML
70 lines
1.6 KiB
YAML
name: Docs CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'docs/**'
|
|
- 'frontend/public/openapi.json'
|
|
- 'frontend/src/pages/api-docs/endpoints.ts'
|
|
- '.github/workflows/docs-ci.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'docs/**'
|
|
- 'frontend/public/openapi.json'
|
|
- 'frontend/src/pages/api-docs/endpoints.ts'
|
|
- '.github/workflows/docs-ci.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: docs
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: pnpm/action-setup@v6
|
|
with:
|
|
package_json_file: docs/package.json
|
|
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version-file: .nvmrc
|
|
cache: pnpm
|
|
cache-dependency-path: docs/pnpm-lock.yaml
|
|
|
|
- run: pnpm install --frozen-lockfile
|
|
|
|
- name: Typecheck
|
|
run: pnpm typecheck
|
|
|
|
- name: Lint
|
|
run: pnpm lint
|
|
|
|
- name: Format check
|
|
run: pnpm format:check
|
|
|
|
- name: Test
|
|
run: pnpm test
|
|
|
|
# The API reference is generated from the panel's own spec. The copy into
|
|
# docs/public and the generated pages both have to be in step with it.
|
|
- name: The docs spec must be the panel's
|
|
run: cmp frontend/public/openapi.json docs/public/openapi.json
|
|
working-directory: .
|
|
|
|
- name: Regenerate the API reference
|
|
run: pnpm gen:api
|
|
|
|
- name: Fail if the generated API reference is stale
|
|
run: git diff --exit-code -- docs/content/docs/en/reference/api
|
|
working-directory: .
|
|
|
|
- name: Build
|
|
run: pnpm build
|