42 lines
856 B
YAML
42 lines
856 B
YAML
# Node.js CI for news-platform bridge
|
|
# Runs on: PR and push to main/develop
|
|
# Checks: TypeScript build and type checking
|
|
name: Node.js CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
env:
|
|
CI: "true"
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [18, 20]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: bridge
|
|
|
|
- name: TypeScript build
|
|
run: npm run build
|
|
working-directory: bridge
|
|
if: always()
|
|
|
|
- name: TypeScript type checking
|
|
run: npm run typecheck
|
|
working-directory: bridge
|
|
if: always() |