Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
vampirical committed Feb 29, 2024
1 parent af04029 commit 7b11ae6
Show file tree
Hide file tree
Showing 32 changed files with 8,974 additions and 500 deletions.
38 changes: 38 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = {
'env': {
'browser': true,
'commonjs': true,
'es2021': true
},
'extends': 'eslint:recommended',
'overrides': [
{
'env': {
'node': true
},
'files': [
'.eslintrc.{js,cjs}'
],
'parserOptions': {
'sourceType': 'script'
}
}
],
'parserOptions': {
'ecmaVersion': 'latest'
},
'globals': {
'__dirname': 'readonly',
'process': 'writable',
},
'rules': {
'linebreak-style': [
'error',
'unix'
],
'semi': [
'error',
'always'
]
}
};
45 changes: 45 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: validate

on: [push, pull_request]

jobs:
validate:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16, 18, 20]

services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Validate
working-directory: ./
run: |
npm i
env PGUSER=postgres PGPASSWORD=postgres npm run test:setup-db
env SUP_SQL_TEST_DSN=postgres://postgres:postgres@127.0.0.1/test npm run validate
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: vampirical/supple-sql
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
node_modules

coverage
docs

.idea
**/*.iml
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage/tmp

.idea
**/*.iml
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Supple SQL

[![validate](https://github.com/vampirical/supple-sql/actions/workflows/validate.yml/badge.svg)](https://github.com/vampirical/supple-sql/actions/workflows/validate.yml)
[![codecov](https://codecov.io/gh/vampirical/supple-sql/graph/badge.svg?token=R6DEXGFIB5)](https://codecov.io/gh/vampirical/supple-sql)

*Minimal viable PostgreSQL only ORM, does as little as it can get away with.*
20 changes: 20 additions & 0 deletions jsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"source": {
"include": ["src", "package.json", "README.md"],
"includePattern": ".js$",
"excludePattern": "(node_modules/|docs)"
},
"plugins": ["plugins/markdown"],
"opts": {
"destination": "docs/",
"encoding": "utf8",
"readme": "./README.md",
"recurse": true,
"template": "./node_modules/clean-jsdoc-theme",
"tutorials": "tutorials/"
},
"markdown": {
"hardwrap": false,
"idInHeadings": true
}
}

0 comments on commit 7b11ae6

Please sign in to comment.