Skip to content

docs: add LICENSE and CHANGELOG; README badges; fill package metadata #1

docs: add LICENSE and CHANGELOG; README badges; fill package metadata

docs: add LICENSE and CHANGELOG; README badges; fill package metadata #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint-build-unit:
name: Lint, build & unit tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- name: Lint
run: npx eslint "src/**/*.ts"
- name: Build
run: npm run build
- name: Unit tests
run: npm test
e2e:
name: E2E (API + worker with PostgreSQL)
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: jobqueue
POSTGRES_PASSWORD: jobqueue
POSTGRES_DB: jobqueue
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.x
cache: npm
- run: npm ci
- name: Run e2e tests
run: npm run test:e2e
env:
RUN_DB_E2E: '1'
POSTGRES_HOST: localhost
POSTGRES_PORT: '5432'
POSTGRES_USER: jobqueue
POSTGRES_PASSWORD: jobqueue
POSTGRES_DB: jobqueue
WORKER_POLL_INTERVAL_MS: '200'