Skip to content

Commit

Permalink
Merge pull request #23 from smartive/feat/api-tests
Browse files Browse the repository at this point in the history
break: Drop support for node 18
  • Loading branch information
nicola-smartive authored Aug 9, 2023
2 parents d12e734 + 8ea1d9c commit 25a8c6a
Show file tree
Hide file tree
Showing 27 changed files with 636 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- run: npm run bootstrap
- run: npm run build
- name: semantic release
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
fail-fast: true
matrix:
version:
- 18
- 20
name: test and build package (node ${{ matrix.version }})
runs-on: ubuntu-latest
Expand All @@ -24,7 +23,9 @@ jobs:
with:
node-version: ${{ matrix.version }}
- run: npm ci
- run: npm test
- run: npm run lint
- run: npm run test:unit
- run: npm run build

test_all:
if: ${{ always() }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ yarn-error.log*
*.tgz

.env

/tmp
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3.4'
services:
postgres:
image: postgres:13-alpine
shm_size: 1gb
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: trust
TZ: 'Europe/Zurich'
ports:
- '5432:5432'
networks:
default:
aliases:
- postgres.local
220 changes: 219 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"main": "dist/cjs/index.cjs",
"types": "dist/esm/index.d.ts",
"engines": {
"node": ">=18"
"node": ">=20"
},
"sideEffecs": false,
"scripts": {
Expand All @@ -17,8 +17,11 @@
"generate:index-files": "cti create ./src --excludes types --withoutbackup",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "npm run lint && npm run test:unit && npm run build",
"deps": "docker-compose up",
"test": "npm run lint && npm run test:unit && npm run test:api && npm run build",
"test:unit": "jest tests/unit --no-cache --no-watchman",
"test:api": "jest tests/api --no-cache --no-watchman",
"generate-migration": "esbuild tests/utils/generate-migration.ts --bundle --platform=node --outdir=tmp --out-extension:.js=.cjs --format=cjs --packages=external && node tmp/generate-migration.cjs",
"clean": "del-cli dist/**",
"prebuild": "npm run clean",
"build": "npm run build:esm && npm run build:cjs",
Expand Down Expand Up @@ -55,9 +58,12 @@
"del-cli": "5.0.0",
"esbuild": "0.19.0",
"eslint": "8.46.0",
"graphql-request": "^6.1.0",
"jest": "29.6.2",
"mock-knex": "0.4.12",
"pg": "^8.11.2",
"prettier": "2.8.8",
"simple-git": "^3.19.1",
"ts-jest": "29.1.1",
"ts-node": "10.9.1",
"typescript": "5.1.6"
Expand Down
Loading

0 comments on commit 25a8c6a

Please sign in to comment.