Skip to content

Merge PR #112: Leaderboard endpoint GET /api/leaderboard with materi… #6

Merge PR #112: Leaderboard endpoint GET /api/leaderboard with materi…

Merge PR #112: Leaderboard endpoint GET /api/leaderboard with materi… #6

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: "20"
PNPM_CACHE_FOLDER: ~/.npm
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- run: npm ci
- run: npm run lint
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- run: npm ci
- run: npm run build
test:
name: Test (coverage)
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: predictify_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/predictify_test
JWT_SECRET: ${{ secrets.JWT_SECRET || 'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj' }}
SOROBAN_RPC_URL: https://soroban-testnet.stellar.org
HORIZON_URL: https://horizon-testnet.stellar.org
PREDICTIFY_CONTRACT_ID: CCIAAAA...
NODE_ENV: test
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- run: npm ci
- run: npm run build
- run: npm run test:coverage