Skip to content
Closed
18 changes: 18 additions & 0 deletions .github/actions/init-npm/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: init-npm
description: 'Initialize the repo with npm and install all the dependencies'
inputs:
node-version:
description: 'Node.js version'
required: true
default: '20.x'
runs:
using: composite
steps:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: npm
- name: Install TS Project dependencies
shell: bash
run: npm ci
34 changes: 17 additions & 17 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v1
uses: ./.github/actions/init-npm
with:
node-version: 16
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm ci

- name: Run linters
uses: wearerequired/lint-action@v1
uses: wearerequired/lint-action@v2
with:
github_token: ${{ secrets.github_token }}
# Enable linters
Expand All @@ -47,11 +47,10 @@ jobs:
tests:
name: Run Tests
runs-on: ubuntu-latest
container: node:16-bullseye

strategy:
matrix:
node: [16.x]
node: [20.x, 22.x]

services:
# Label used to access the service container
Expand All @@ -62,7 +61,7 @@ jobs:
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 1234
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
# Set health checks to wait until postgres has started
Expand All @@ -74,21 +73,22 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install pg client
run: |
apt-get update && apt-get install -y lsb-release curl ca-certificates
install -d /usr/share/postgresql-common/pgdg
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
apt-get update
apt-get install -y postgresql-client
sudo apt-get update && sudo apt-get install -y lsb-release
echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list > /dev/null
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /usr/share/keyrings/postgresql-keyring.asc > /dev/null
echo "deb [signed-by=/usr/share/keyrings/postgresql-keyring.asc] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list > /dev/null
sudo apt-get update
sudo apt-get install -y postgresql-client
shell: bash

- name: Create schema
run: psql -h postgres -d postgres -U postgres -c 'CREATE EXTENSION pgcrypto;'
run: psql -h localhost -d postgres -U postgres -c 'CREATE EXTENSION pgcrypto;'
env:
PGPASSWORD: 1234
PGPASSWORD: postgres

- name: Set up Node.js
uses: actions/setup-node@v1
Expand All @@ -103,7 +103,7 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: Test Reporters
name: Test Reporters Node-${{ matrix.node }}
path: reports/**

build_image:
Expand Down
29 changes: 18 additions & 11 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@
"level": "info",
"prettyPrint": false
},
"shared": {},
"tracing": {
"isEnabled": false
},
"metrics": {
"enabled": true,
"buckets": [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 15, 50, 250, 500]
}
},
"server": {
"port": "8080",
"port": 8080,
"request": {
"payload": {
"limit": "1mb"
Expand All @@ -32,11 +36,12 @@
"app": {
"projectName": "default",
"enableRequestQueueHandling": true,
"requestQueueCheckIntervalSec": 30,
"requestQueueCheckIntervalSec": 1,
"tilesBatchSize": 10000,
"metatileSize": 8,
"consumeDelay": {
"enabled": false
"enabled": false,
"delaySec": 1
},
"force": {
"api": false,
Expand All @@ -53,15 +58,17 @@
"db": {
"host": "localhost",
"port": 5432,
"user": "postgres",
"username": "postgres",
"password": "postgres",
"schema": "pgboss",
"enableSslAuth": false,
"sslPaths": {
"ca": "",
"key": "",
"cert": ""
"ssl": {
"enabled": false
},
"database": "postgres"
"database": "postgres",
"schema": "public"
},
"objectStorage": {
"protocol": "http",
"host": "some_object_storage_host",
"port": 9000
}
}
73 changes: 67 additions & 6 deletions config/test.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,74 @@
{
"openapiConfig": {
"filePath": "./openapi3.yaml",
"basePath": "/docs",
"rawPath": "/api",
"uiPath": "/api"
},
"telemetry": {
"logger": {
"level": "info",
"prettyPrint": false
},
"shared": {},
"tracing": {
"isEnabled": false
},
"metrics": {
"enabled": true,
"buckets": [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 15, 50, 250, 500]
}
},
"server": {
"port": 8080,
"request": {
"payload": {
"limit": "1mb"
}
},
"response": {
"compression": {
"enabled": true,
"options": null
}
}
},
"app": {
"projectName": "default",
"enableRequestQueueHandling": true,
"requestQueueCheckIntervalSec": 1,
"tilesBatchSize": 10000,
"metatileSize": 8,
"consumeDelay": {
"enabled": false,
"delaySec": 1
},
"force": {
"api": false,
"expiredTiles": false
}
},
"queue": {
"expireInSeconds": 600,
"retryBackoff": true,
"retryLimit": 3,
"retryDelaySeconds": 60,
"retentionHours": 87660
},
"db": {
"host": "postgres",
"schema": "public",
"host": "localhost",
"port": 5432,
"username": "postgres",
"password": "1234",
"password": "postgres",
"ssl": {
"enabled": false
},
"database": "postgres",
"enableSslAuth": false
"schema": "public"
},
"app": {
"requestQueueCheckIntervalSec": 1
"objectStorage": {
"protocol": "http",
"host": "some_object_storage_host",
"port": 9000
}
}
Loading
Loading