From cf794a9f3d45886884bd62c719838466ac54c75a Mon Sep 17 00:00:00 2001 From: Team Gaya Date: Sun, 18 Oct 2026 21:58:09 +0530 Subject: [PATCH] ci: run the documented verification checks on every push and pull request The repo has no CI, so nothing checks a PR before review. This workflow runs the local checks listed in docs/VERIFICATION.md: - npm test on Node 20, 22 and 24 (engines.node is >=20; the Docker image uses 24) - npm run test:dashboard and the dashboard production build No lockfile is committed, so it uses npm install and keys the npm cache on package.json. The MongoDB integration check is left out until the Discord mock gaps in #51 are closed, otherwise it would fail on every run. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1887b06 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +# Runs the local checks from docs/VERIFICATION.md on every push and pull request. +# The MongoDB integration check (npm run test:integration) is not included yet: +# it needs the Discord mock gaps from #51 closed before it can pass. +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: npm test (Node ${{ matrix.node }}) + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + node: [20, 22, 24] + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + - uses: actions/setup-node@v7 + with: + node-version: ${{ matrix.node }} + cache: npm + # No lockfile is committed (see .gitignore), so key the cache on the manifest. + cache-dependency-path: package.json + - run: npm install --no-audit --no-fund + - run: npm test + + dashboard: + name: Dashboard check and build + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + - uses: actions/setup-node@v7 + with: + node-version: 24 + cache: npm + cache-dependency-path: plugins/administration/web/package.json + - run: npm install --no-audit --no-fund + working-directory: plugins/administration/web + - run: npm run test:dashboard + - run: npm --prefix plugins/administration/web run build