This repository was archived by the owner on Oct 17, 2021. It is now read-only.
-
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.
- Loading branch information
Showing
81 changed files
with
11,523 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.yml] | ||
indent_style = space | ||
|
||
[.*-version] | ||
insert_final_newline = false | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.diff] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[LICENSE] | ||
insert_final_newline = false |
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,27 @@ | ||
PORT=4000 | ||
|
||
# required | ||
JWT_SECRET="changeme" | ||
|
||
NEO4J_USERNAME="neo4j" | ||
NEO4J_PASSWORD="changeme" | ||
NEO4J_HOST="localhost" | ||
NEO4J_HTTP_PORT=7474 | ||
NEO4J_BOLT_PORT=7687 | ||
NEO4J_URL="bolt://${NEO4J_HOST}:${NEO4J_BOLT_PORT}" | ||
|
||
MYSQL_PASSWORD="changeme" | ||
MYSQL_HOST="localhost" | ||
MYSQL_PORT=3306 | ||
MYSQL_DATABASE="database" | ||
PRISMA_DATABASE_URL="mysql://root:${MYSQL_PASSWORD}@${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DATABASE}" | ||
|
||
# required for local test | ||
TEST_NEO4J_HOST="localhost" | ||
TEST_NEO4J_BOLT_PORT=7688 | ||
TEST_NEO4J_URL="bolt://${TEST_NEO4J_HOST}:${TEST_NEO4J_BOLT_PORT}" | ||
|
||
TEST_MYSQL_HOST="localhost" | ||
TEST_MYSQL_PORT=3307 | ||
TEST_MYSQL_DATABASE="testdb" | ||
TEST_PRISMA_DATABASE_URL="mysql://root:@${TEST_MYSQL_HOST}:${TEST_MYSQL_PORT}/${TEST_MYSQL_DATABASE}" |
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,11 @@ | ||
# dependencies | ||
package-lock.json | ||
|
||
# output | ||
dist/ | ||
|
||
# test | ||
coverage/ | ||
|
||
# auto generated | ||
src/graphql.ts |
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,29 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"plugin:@shopify/typescript", | ||
"plugin:@shopify/jest", | ||
"plugin:@shopify/prettier" | ||
], | ||
"plugins": ["unused-imports"], | ||
"rules": { | ||
"import/extensions": [0], | ||
"unused-imports/no-unused-imports": [2], | ||
"@typescript-eslint/consistent-type-definitions": [2, "type"], | ||
"@typescript-eslint/consistent-indexed-object-style": [2, "record"] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.module.ts"], | ||
"rules": { | ||
"@typescript-eslint/no-extraneous-class": 0 | ||
} | ||
}, | ||
{ | ||
"files": ["*.config.ts"], | ||
"rules": { | ||
"no-process-env": 0 | ||
} | ||
} | ||
] | ||
} |
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,84 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
ts-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
cache: yarn | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn run ts-check | ||
|
||
eslint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
cache: yarn | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn run lint:eslint | ||
|
||
prettier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
cache: yarn | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn run lint:prettier | ||
|
||
test-large: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
TEST_NEO4J_URL: bolt://localhost:7687 | ||
TEST_PRISMA_DATABASE_URL: mysql://root:@localhost:3306/testdb | ||
|
||
services: | ||
neo4j: | ||
image: neo4j:4.2 | ||
env: | ||
NEO4J_AUTH: none | ||
NEO4JLABS_PLUGINS: '["apoc"]' | ||
ports: | ||
- 7474:7474 | ||
- 7687:7687 | ||
options: >- | ||
--health-cmd "wget http://localhost:7474/browser -O-" | ||
--health-interval 5s | ||
--health-timeout 3s | ||
--health-retries 5 | ||
mysql: | ||
image: mysql:8 | ||
env: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' | ||
MYSQL_DATABASE: testdb | ||
ports: | ||
- 3306:3306 | ||
options: >- | ||
--health-cmd "mysqladmin ping -h localhost" | ||
--health-interval 5s | ||
--health-timeout 3s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
cache: yarn | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn run test:large |
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,26 @@ | ||
# dependencies | ||
node_modules/ | ||
package-lock.json | ||
|
||
# logfiles | ||
*.log | ||
|
||
# output | ||
dist/ | ||
|
||
# test | ||
coverage/ | ||
|
||
# env | ||
.env* | ||
!.env.example | ||
|
||
# OS | ||
.DS_Store | ||
|
||
# VSCode | ||
.vscode/* | ||
!.vscode/extensions.json | ||
|
||
# ESLint | ||
.eslintcache |
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 @@ | ||
14.16.1 |
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,11 @@ | ||
# dependencies | ||
package-lock.json | ||
|
||
# output | ||
dist/ | ||
|
||
# test | ||
coverage/ | ||
|
||
# auto generated | ||
src/graphql.ts |
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 @@ | ||
"@shopify/prettier-config" |
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,11 @@ | ||
{ | ||
"recommendations": [ | ||
"EditorConfig.EditorConfig", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"christian-kohler.path-intellisense", | ||
"ms-azuretools.vscode-docker", | ||
"graphql.vscode-graphql", | ||
"prisma.prisma" | ||
] | ||
} |
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,20 @@ | ||
version: '3.8' | ||
|
||
services: | ||
test-neo4j: | ||
image: neo4j:4.2 | ||
ports: | ||
- published: $TEST_NEO4J_BOLT_PORT | ||
target: 7687 | ||
environment: | ||
NEO4J_AUTH: none | ||
NEO4JLABS_PLUGINS: '["apoc"]' | ||
|
||
test-mysql: | ||
image: mysql:8 | ||
ports: | ||
- published: $TEST_MYSQL_PORT | ||
target: 3306 | ||
environment: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' | ||
MYSQL_DATABASE: $TEST_MYSQL_DATABASE |
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,41 @@ | ||
version: '3.8' | ||
|
||
services: | ||
neo4j: | ||
image: neo4j:4.2 | ||
ports: | ||
- published: $NEO4J_HTTP_PORT | ||
target: 7474 | ||
- published: $NEO4J_BOLT_PORT | ||
target: 7687 | ||
healthcheck: | ||
test: wget http://localhost:7474/browser -O- | ||
interval: 5s | ||
timeout: 3s | ||
retries: 30 | ||
environment: | ||
NEO4J_AUTH: ${NEO4J_USERNAME}/${NEO4J_PASSWORD} | ||
NEO4JLABS_PLUGINS: '["apoc"]' | ||
volumes: | ||
- henken-club-backend-prototype-neo4j-data:/data | ||
- henken-club-backend-prototype-neo4j-logs:/logs | ||
- henken-club-backend-prototype-neo4j-import:/var/lib/neo4j/import | ||
- henken-club-backend-prototype-neo4j-plugins:/plugins | ||
|
||
mysql: | ||
image: mysql:8 | ||
ports: | ||
- published: $MYSQL_PORT | ||
target: 3306 | ||
environment: | ||
MYSQL_ROOT_PASSWORD: $MYSQL_PASSWORD | ||
MYSQL_DATABASE: $MYSQL_DATABASE | ||
volumes: | ||
- henken-club-backend-prototype-mysql-data:/var/lib/mysql | ||
|
||
volumes: | ||
henken-club-backend-prototype-neo4j-data: | ||
henken-club-backend-prototype-neo4j-logs: | ||
henken-club-backend-prototype-neo4j-import: | ||
henken-club-backend-prototype-neo4j-plugins: | ||
henken-club-backend-prototype-mysql-data: |
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,19 @@ | ||
import type {Config} from '@jest/types'; | ||
import {pathsToModuleNameMapper} from 'ts-jest/utils'; | ||
|
||
import {compilerOptions} from './tsconfig.json'; | ||
|
||
const config: Config.InitialOptions = { | ||
preset: 'ts-jest', | ||
testTimeout: 30000, | ||
testEnvironment: 'node', | ||
rootDir: './', | ||
testMatch: ['<rootDir>/src/**/test/large/*.test.ts'], | ||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { | ||
prefix: '<rootDir>/', | ||
}), | ||
collectCoverage: true, | ||
coverageDirectory: './coverage/large', | ||
reporters: ['default'], | ||
}; | ||
export default config; |
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,7 @@ | ||
pre-commit: | ||
parallel: true | ||
commands: | ||
eslint: | ||
run: yarn run lint:eslint | ||
prettier: | ||
run: yarn run lint:prettier |
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,3 @@ | ||
{ | ||
"sourceRoot": "src" | ||
} |
Oops, something went wrong.