mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-17 11:17:46 +00:00
Compare commits
1 Commits
883c875e39
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a9d993cc42 |
2
.github/workflows/db-lint.yml
vendored
2
.github/workflows/db-lint.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the source
|
- name: Check out the source
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Set env
|
- name: Set env
|
||||||
run: cp .env.example .env
|
run: cp .env.example .env
|
||||||
|
2
.github/workflows/db-test.yml
vendored
2
.github/workflows/db-test.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the source
|
- name: Check out the source
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Set env
|
- name: Set env
|
||||||
run: cp .env.example .env
|
run: cp .env.example .env
|
||||||
|
2
.github/workflows/frontend-test.yml
vendored
2
.github/workflows/frontend-test.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: 'true'
|
submodules: 'true'
|
||||||
|
|
||||||
|
2
.github/workflows/grafana-test.yml
vendored
2
.github/workflows/grafana-test.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Set env
|
- name: Set env
|
||||||
run: cp .env.example .env
|
run: cp .env.example .env
|
||||||
|
12
README.md
12
README.md
@@ -24,8 +24,6 @@
|
|||||||
<a href="https://github.com/sponsors/xbgmsharp">Sponsors</a>
|
<a href="https://github.com/sponsors/xbgmsharp">Sponsors</a>
|
||||||
.
|
.
|
||||||
<a href="https://discord.gg/uuZrwz4dCS">Discord</a>
|
<a href="https://discord.gg/uuZrwz4dCS">Discord</a>
|
||||||
.
|
|
||||||
<a href="https://deepwiki.com/xbgmsharp/postgsail/">DeepWiki</a>
|
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -35,23 +33,19 @@
|
|||||||
[](http://makeapullrequest.com)
|
[](http://makeapullrequest.com)
|
||||||

|

|
||||||
[](https://github.com/xbgmsharp/postgsail/stargazers)
|
[](https://github.com/xbgmsharp/postgsail/stargazers)
|
||||||
[](https://deepwiki.com/xbgmsharp/postgsail)
|
|
||||||
|
|
||||||
[](https://github.com/xbgmsharp/postgsail/actions/workflows/db-test.yml)
|
[](https://github.com/xbgmsharp/postgsail/actions/workflows/db-test.yml)
|
||||||
[](https://github.com/xbgmsharp/postgsail/actions/workflows/frontend-test.yml)
|
[](https://github.com/xbgmsharp/postgsail/actions/workflows/frontend-test.yml)
|
||||||
[](https://github.com/xbgmsharp/postgsail/actions/workflows/grafana-test.yml)
|
[](https://github.com/xbgmsharp/postgsail/actions/workflows/grafana-test.yml)
|
||||||
|
|
||||||
signalk-postgsail:
|
signalk-postgsail:
|
||||||
[](https://github.com/xbgmsharp/signalk-postgsail/releases/latest)
|
[](https://github.com/xbgmsharp/signalk-postgsail/releases/latest)
|
||||||
|
|
||||||
postgsail-backend:
|
|
||||||
[](https://github.com/xbgmsharp/postgsail/releases/latest)
|
|
||||||
|
|
||||||
postgsail-frontend:
|
postgsail-frontend:
|
||||||
[](https://github.com/xbgmsharp/vuestic-postgsail/releases/latest)
|
[](https://github.com/xbgmsharp/vuestic-postgsail/releases/latest)
|
||||||
|
|
||||||
postgsail-telegram-bot:
|
postgsail-telegram-bot:
|
||||||
[](https://github.com/xbgmsharp/postgsail-telegram-bot/releases/latest)
|
[](https://github.com/xbgmsharp/postgsail-telegram-bot/releases/latest)
|
||||||
|
|
||||||
[](https://www.bestpractices.dev/projects/8124)
|
[](https://www.bestpractices.dev/projects/8124)
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# PostgSail Unit Tests
|
# PostgSail Unit Tests
|
||||||
The Unit Tests allow to automatically validate SQL and API workflow.
|
The Unit Tests allow to automatically validate api workflow.
|
||||||
|
|
||||||
## A global overview
|
## A global overview
|
||||||
Based on `mocha` & `psql`
|
Based on `mocha` & `psql`
|
||||||
|
@@ -688,7 +688,7 @@ var moment = require("moment");
|
|||||||
should.exist(res.body);
|
should.exist(res.body);
|
||||||
let event = res.body;
|
let event = res.body;
|
||||||
//console.log(event);
|
//console.log(event);
|
||||||
// minimum events log per users 6 + 4 logs + OTP one per login
|
// minimum events log for kapla & aava 13 + 4 email_otp = 17
|
||||||
event.length.should.be.aboveOrEqual(11);
|
event.length.should.be.aboveOrEqual(11);
|
||||||
done(err);
|
done(err);
|
||||||
});
|
});
|
||||||
|
@@ -8,5 +8,8 @@
|
|||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"should": "^13.2.3",
|
"should": "^13.2.3",
|
||||||
"supertest": "^6.3.3"
|
"supertest": "^6.3.3"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"schemalint": "^2.0.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
You are now connected to database "signalk" as user "username".
|
You are now connected to database "signalk" as user "username".
|
||||||
Expanded display is on.
|
Expanded display is on.
|
||||||
-[ RECORD 1 ]--+--------------------------------
|
-[ RECORD 1 ]--+-------------------------------
|
||||||
server_version | 16.10 (Debian 16.10-1.pgdg12+1)
|
server_version | 16.9 (Debian 16.9-1.pgdg120+1)
|
||||||
|
|
||||||
-[ RECORD 1 ]--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-[ RECORD 1 ]--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
postgis_full_version | POSTGIS="3.5.3 aab5f55" [EXTENSION] PGSQL="160" GEOS="3.11.1-CAPI-1.17.1" PROJ="9.1.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/var/lib/postgresql/.local/share/proj DATABASE_PATH=/usr/share/proj/proj.db" (compiled against PROJ 9.1.1) LIBXML="2.9.14" LIBJSON="0.16" LIBPROTOBUF="1.4.1" WAGYU="0.5.0 (Internal)"
|
postgis_full_version | POSTGIS="3.5.3 aab5f55" [EXTENSION] PGSQL="160" GEOS="3.11.1-CAPI-1.17.1" PROJ="9.1.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/var/lib/postgresql/.local/share/proj DATABASE_PATH=/usr/share/proj/proj.db" (compiled against PROJ 9.1.1) LIBXML="2.9.14" LIBJSON="0.16" LIBPROTOBUF="1.4.1" WAGYU="0.5.0 (Internal)"
|
||||||
@@ -58,7 +58,7 @@ Schema | public
|
|||||||
Description | PostGIS geometry and geography spatial types and functions
|
Description | PostGIS geometry and geography spatial types and functions
|
||||||
-[ RECORD 10 ]-------------------------------------------------------------------------------------
|
-[ RECORD 10 ]-------------------------------------------------------------------------------------
|
||||||
Name | timescaledb
|
Name | timescaledb
|
||||||
Version | 2.21.3
|
Version | 2.21.1
|
||||||
Schema | public
|
Schema | public
|
||||||
Description | Enables scalable inserts and complex queries for time-series data (Community Edition)
|
Description | Enables scalable inserts and complex queries for time-series data (Community Edition)
|
||||||
-[ RECORD 11 ]-------------------------------------------------------------------------------------
|
-[ RECORD 11 ]-------------------------------------------------------------------------------------
|
||||||
@@ -755,13 +755,13 @@ overpass_py_fn | {"name": "Port de la Ginesta", "type": "multipolygon", "leisure
|
|||||||
-[ RECORD 1 ]--+---------------------------------------------------------------------------------------------------------------
|
-[ RECORD 1 ]--+---------------------------------------------------------------------------------------------------------------
|
||||||
overpass_py_fn | {"name": "Norra hamnen", "leisure": "marina", "seamark:type": "harbour", "seamark:harbour:category": "marina"}
|
overpass_py_fn | {"name": "Norra hamnen", "leisure": "marina", "seamark:type": "harbour", "seamark:harbour:category": "marina"}
|
||||||
|
|
||||||
-[ RECORD 1 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-[ RECORD 1 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
versions_fn | {"api_version" : "0.9.3", "sys_version" : "PostgreSQL 16.10", "mobilitydb" : "1.2.0", "timescaledb" : "2.21.3", "postgis" : "3.5.3", "postgrest" : "PostgREST 13.0.5"}
|
versions_fn | {"api_version" : "0.9.3", "sys_version" : "PostgreSQL 16.9", "mobilitydb" : "1.2.0", "timescaledb" : "2.21.1", "postgis" : "3.5.3", "postgrest" : "PostgREST 13.0.4"}
|
||||||
|
|
||||||
-[ RECORD 1 ]-----------------
|
-[ RECORD 1 ]-----------------
|
||||||
api_version | 0.9.3
|
api_version | 0.9.3
|
||||||
sys_version | PostgreSQL 16.10
|
sys_version | PostgreSQL 16.9
|
||||||
timescaledb | 2.21.3
|
timescaledb | 2.21.1
|
||||||
postgis | 3.5.3
|
postgis | 3.5.3
|
||||||
postgrest | PostgREST 13.0.5
|
postgrest | PostgREST 13.0.4
|
||||||
|
|
||||||
|
@@ -14,6 +14,15 @@ if [[ ! -x "/usr/bin/psql" ]]; then
|
|||||||
apt update && apt -y install postgresql-client
|
apt update && apt -y install postgresql-client
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# go install
|
||||||
|
if [[ ! -x "/usr/bin/go" || ! -x "/root/go/bin/mermerd" ]]; then
|
||||||
|
#wget -q https://go.dev/dl/go1.21.4.linux-arm64.tar.gz && \
|
||||||
|
#rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.4.linux-arm64.tar.gz && \
|
||||||
|
apt update && apt -y install golang-go && \
|
||||||
|
#go install github.com/KarnerTh/mermerd@latest require latest go version
|
||||||
|
go install github.com/KarnerTh/mermerd@v0.11.0
|
||||||
|
fi
|
||||||
|
|
||||||
# pnpm install
|
# pnpm install
|
||||||
if [[ ! -x "/usr/local/bin/pnpm" ]]; then
|
if [[ ! -x "/usr/local/bin/pnpm" ]]; then
|
||||||
npm install -g pnpm
|
npm install -g pnpm
|
||||||
@@ -222,17 +231,17 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Stats SQL unit tests
|
# Stats SQL unit tests
|
||||||
psql ${PGSAIL_DB_URI} < sql/stats.sql > output/stats.sql.output
|
#psql ${PGSAIL_DB_URI} < sql/stats.sql > output/stats.sql.output
|
||||||
diff sql/stats.sql.output output/stats.sql.output > /dev/null
|
#diff sql/stats.sql.output output/stats.sql.output > /dev/null
|
||||||
#diff -u sql/stats.sql.output output/stats.sql.output | wc -l
|
#diff -u sql/stats.sql.output output/stats.sql.output | wc -l
|
||||||
#echo 0
|
#echo 0
|
||||||
if [ $? -eq 0 ]; then
|
#if [ $? -eq 0 ]; then
|
||||||
echo SQL stats.sql OK
|
# echo SQL stats.sql OK
|
||||||
else
|
#else
|
||||||
echo SQL stats.sql FAILED
|
# echo SQL stats.sql FAILED
|
||||||
diff -u sql/stats.sql.output output/stats.sql.output
|
# diff -u sql/stats.sql.output output/stats.sql.output
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
# MobilityDB SQL unit tests
|
# MobilityDB SQL unit tests
|
||||||
psql ${PGSAIL_DB_URI} < sql/mobilitydb.sql > output/mobilitydb.sql.output
|
psql ${PGSAIL_DB_URI} < sql/mobilitydb.sql > output/mobilitydb.sql.output
|
||||||
@@ -283,3 +292,17 @@ else
|
|||||||
echo openapi.json FAILED
|
echo openapi.json FAILED
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Generate and update mermaid schema documentation
|
||||||
|
/root/go/bin/mermerd --runConfig ../docs/ERD/mermerdConfig.yaml
|
||||||
|
#echo $?
|
||||||
|
echo 0 # not working in github-actions
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
cp postgsail.md ../docs/ERD/postgsail.md
|
||||||
|
echo postgsail.md OK
|
||||||
|
else
|
||||||
|
echo postgsail.md FAILED
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#npm i -D schemalint && npx schemalint
|
||||||
|
Reference in New Issue
Block a user