From 89a37219801afe1edfbf8c09d7c7855eb71fcf3a Mon Sep 17 00:00:00 2001 From: Nerdy-Technician Date: Sat, 26 Sep 2026 16:26:19 +0100 Subject: [PATCH] ci: add CI checks --- .github/dependabot.yml | 21 ++++++++++++++++++ .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d610427 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,21 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + - package-ecosystem: npm + directory: / + schedule: + interval: weekly + open-pull-requests-limit: 5 + - package-ecosystem: npm + directory: /client + schedule: + interval: weekly + open-pull-requests-limit: 5 + - package-ecosystem: docker + directory: / + schedule: + interval: weekly + open-pull-requests-limit: 5 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fd7c008 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +concurrency: + group: ci-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build server + client + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 + with: + node-version: 24 + cache: npm + cache-dependency-path: | + package-lock.json + client/package-lock.json + - name: Install server dependencies + run: npm ci + - name: Install client dependencies + run: npm ci --prefix client + - name: Build (tsc + client) + run: npm run build + + docker: + name: Dockerfile + compose + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v7 + - name: Lint Dockerfile (errors only) + run: docker run --rm -i hadolint/hadolint:latest-alpine hadolint --failure-threshold error - < Dockerfile + - name: Validate docker-compose.yml + env: + SESSION_SECRET: ci-placeholder + run: docker compose -f docker-compose.yml config --quiet