Files
news-platform/.gitea/workflows/test.yml
T
Maria PapoilaandPaperclip 3d4b129b4c
Tests / writer-pipeline tests (push) Failing after 1s
Tests / bridge tests (push) Failing after 1s
Tests / frontend lib tests (push) Failing after 1s
Tests / writer-pipeline tests (pull_request) Successful in 52s
Tests / bridge tests (pull_request) Successful in 25s
Tests / frontend lib tests (pull_request) Successful in 29s
BIT-15752: Add unit tests across writer-pipeline, bridge, and frontend
87 new tests covering previously untested pure functions:
- writer-pipeline: token-metrics, store (canonicalUrl/itemId/upsertItem/shortlist), config-load
- bridge: ranking (freshness/relevance/rank/filter/take_top_n), aggregator-mapper
- frontend/lib: format, ui-i18n, public-origin

Adds test:coverage scripts (node --experimental-test-coverage) and Gitea
CI workflow. writer-pipeline now reports 95.91% line coverage.

Co-Authored-By: Paperclip <[email protected]>
2026-04-29 01:08:41 +00:00

60 lines
1.4 KiB
YAML

name: Tests
on:
push:
branches: ["**"]
pull_request:
branches: [main]
jobs:
writer-pipeline:
name: writer-pipeline tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: writer-pipeline
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: writer-pipeline/package-lock.json
- run: npm ci
- name: Run tests with coverage
run: npm run test:coverage
bridge:
name: bridge tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: bridge
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: bridge/package-lock.json
- run: npm ci
- name: Run tests with coverage
run: npm run test:coverage
frontend-lib:
name: frontend lib tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- run: npm install
- name: Run lib tests with coverage
run: npm run test:coverage