ci: add UI type-check and build job to CI and release workflows
All checks were successful
CI / Test (pull_request) Successful in 9s
CI / Lint (pull_request) Successful in 50s
CI / Build (pull_request) Successful in 16s
CI / UI (pull_request) Successful in 6m20s

This commit is contained in:
Admin
2026-03-06 11:35:02 +05:00
parent b4be0803aa
commit 60bc8e5749
2 changed files with 65 additions and 8 deletions

View File

@@ -5,22 +5,23 @@ on:
branches: ["main", "master"]
paths:
- "scraper/**"
- "ui/**"
- ".gitea/workflows/**"
pull_request:
branches: ["main", "master"]
paths:
- "scraper/**"
- "ui/**"
- ".gitea/workflows/**"
defaults:
run:
working-directory: scraper
jobs:
# ── lint & vet ───────────────────────────────────────────────────────────────
# ── scraper: lint & vet ──────────────────────────────────────────────────────
lint:
name: Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: scraper
steps:
- uses: actions/checkout@v4
@@ -35,10 +36,13 @@ jobs:
- name: staticcheck
run: go tool staticcheck ./...
# ── tests ────────────────────────────────────────────────────────────────────
# ── scraper: tests ───────────────────────────────────────────────────────────
test:
name: Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: scraper
steps:
- uses: actions/checkout@v4
@@ -50,11 +54,14 @@ jobs:
- name: Run tests
run: go test -race -count=1 -timeout=60s ./...
# ── build binary ─────────────────────────────────────────────────────────────
# ── scraper: build binary ────────────────────────────────────────────────────
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, test]
defaults:
run:
working-directory: scraper
steps:
- uses: actions/checkout@v4
@@ -75,6 +82,31 @@ jobs:
path: scraper/bin/scraper
retention-days: 7
# ── ui: type-check & build ───────────────────────────────────────────────────
ui:
name: UI
runs-on: ubuntu-latest
defaults:
run:
working-directory: ui
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: ui/package-lock.json
- name: Install dependencies
run: npm ci
- name: Type check
run: npm run check
- name: Build
run: npm run build
# ── docker build (& push) ────────────────────────────────────────────────────
# Uncomment once the runner has Docker available and a registry is configured.
#