forked from graphile/crystal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: tests++; yarn2; actions; deps++; format; PG>=10; node>=12 (gra…
- Loading branch information
Showing
225 changed files
with
63,047 additions
and
19,114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Node CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CI: true | ||
PGVERSION: ${{ matrix.postgres-version}} | ||
TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/graphileengine_test | ||
TEST_PG_URL: postgres://postgres:postgres@localhost:5432/postgraphile_test | ||
LDS_TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/lds_test | ||
TERM: xterm | ||
FORCE_COLOR: 1 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
postgres-version: [10, 11, 12] | ||
node-version: [12.x, 14.x] | ||
|
||
services: | ||
postgres: | ||
image: postgres:${{ matrix.postgres-version }} | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
ports: | ||
- "0.0.0.0:5432:5432" | ||
# needed because the postgres container does not provide a healthcheck | ||
options: | ||
--health-cmd pg_isready --health-interval 10s --health-timeout 5s | ||
--health-retries 5 --name postgres | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Configure PostgreSQL | ||
run: | | ||
cat .github/workflows/ci/docker-entrypoint-initdb.d/010-enable_wal.sh | docker exec -i postgres bash | ||
cat .github/workflows/ci/docker-entrypoint-initdb.d/020-wal2json.sh | docker exec -i postgres bash | ||
cat .github/workflows/ci/docker-entrypoint-initdb.d/030-setup.sh | docker exec -i postgres bash | ||
docker restart postgres | ||
- name: Install pg_dump | ||
run: | | ||
sudo bash -c "echo deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main >> /etc/apt/sources.list.d/pgdg.list" | ||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | ||
sudo apt-get update | ||
sudo apt-get -yqq install postgresql-client-${{ matrix.postgres-version }} | ||
- run: yarn --immutable | ||
- run: ./scripts/ci |
4 changes: 4 additions & 0 deletions
4
.github/workflows/ci/docker-entrypoint-initdb.d/010-enable_wal.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
echo -e 'wal_level = logical\nmax_replication_slots = 10\nmax_wal_senders = 10' >> /var/lib/postgresql/data/postgresql.conf |
32 changes: 32 additions & 0 deletions
32
.github/workflows/ci/docker-entrypoint-initdb.d/020-wal2json.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# This setup script is heavily inspired by | ||
# https://github.com/debezium/docker-images/blob/master/postgres/11/Dockerfile | ||
|
||
PROTOC_VERSION=1.3 | ||
WAL2JSON_COMMIT_ID=c54d89649c3fe5e0aa79c3a87493935232e962a7 | ||
USE_PGXS=1 | ||
export PGUSER=postgres | ||
export PGPASSWORD=postgres | ||
createuser --superuser root | ||
|
||
apt-get update | ||
apt-get install -f -y --no-install-recommends \ | ||
software-properties-common \ | ||
build-essential \ | ||
pkg-config \ | ||
git \ | ||
postgresql-server-dev-$PG_MAJOR | ||
add-apt-repository "deb http://ftp.debian.org/debian testing main contrib" | ||
apt-get update | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
cd / | ||
git clone https://github.com/eulerto/wal2json -b master --single-branch | ||
cd wal2json | ||
git checkout $WAL2JSON_COMMIT_ID | ||
make | ||
make install | ||
cd .. | ||
rm -rf wal2json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
createdb graphileengine_test | ||
createdb postgraphile_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire, createRequireFromPath} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.js"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
// Setup the environment to be able to require eslint/bin/eslint.js | ||
require(absPnpApiPath).setup(); | ||
} | ||
|
||
// Defer to the real eslint/bin/eslint.js your application uses | ||
module.exports = absRequire(`eslint/bin/eslint.js`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire, createRequireFromPath} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.js"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
// Setup the environment to be able to require eslint/lib/api.js | ||
require(absPnpApiPath).setup(); | ||
} | ||
|
||
// Defer to the real eslint/lib/api.js your application uses | ||
module.exports = absRequire(`eslint/lib/api.js`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "eslint", | ||
"version": "6.8.0-pnpify", | ||
"main": "./lib/api.js", | ||
"type": "commonjs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire, createRequireFromPath} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../.pnp.js"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
// Setup the environment to be able to require prettier/index.js | ||
require(absPnpApiPath).setup(); | ||
} | ||
|
||
// Defer to the real prettier/index.js your application uses | ||
module.exports = absRequire(`prettier/index.js`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "prettier", | ||
"version": "1.19.1-pnpify", | ||
"main": "./index.js", | ||
"type": "commonjs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire, createRequireFromPath} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.js"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
// Setup the environment to be able to require typescript/bin/tsc | ||
require(absPnpApiPath).setup(); | ||
} | ||
|
||
// Defer to the real typescript/bin/tsc your application uses | ||
module.exports = absRequire(`typescript/bin/tsc`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire, createRequireFromPath} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.js"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
// Setup the environment to be able to require typescript/bin/tsserver | ||
require(absPnpApiPath).setup(); | ||
} | ||
|
||
// Defer to the real typescript/bin/tsserver your application uses | ||
module.exports = absRequire(`typescript/bin/tsserver`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire, createRequireFromPath} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.js"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
// Setup the environment to be able to require typescript/lib/tsc.js | ||
require(absPnpApiPath).setup(); | ||
} | ||
|
||
// Defer to the real typescript/lib/tsc.js your application uses | ||
module.exports = absRequire(`typescript/lib/tsc.js`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire, createRequireFromPath} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.js"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
// Setup the environment to be able to require typescript/lib/tsserver.js | ||
require(absPnpApiPath).setup(); | ||
} | ||
|
||
// Defer to the real typescript/lib/tsserver.js your application uses | ||
module.exports = absRequire(`typescript/lib/tsserver.js`); |
Oops, something went wrong.