Skip to content

feat: basic debugging logs #64

feat: basic debugging logs

feat: basic debugging logs #64

Workflow file for this run

# This workflow will do a clean install of node dependencies, run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on: [push, pull_request]
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: test
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- run: npm install -g corepack@latest
- run: corepack enable
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- run: pnpm i
- run: pnpm run lint
- run: pnpm run test
coverage:
name: coverage
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- run: npm install -g corepack@latest
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
- run: pnpm i
- run: pnpm run coverage
- uses: qltysh/qlty-action/coverage@v2
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: coverage/lcov.info
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g corepack@latest
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
- run: pnpm i
- run: pnpm run build