Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge payment repositories into one #160

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ module.exports = {
},
overrides: [
{
files: ["src/**/*.ts"],
files: [
"packages/*/src/**/*.ts",
"packages/*/test/**/*.ts"
],
rules: {
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-duplicate-imports": "error",
Expand Down
5 changes: 0 additions & 5 deletions .eslintrc.test.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Before submitting a Pull Request, please test your code.
If you created a new created a new feature, then create the unit test function, too.

```bash
# COMPILE THE BACKEND SERVER
npm run build
# INSTALL DEPENDENCIES
npm install

# RUN THE TEST AUTOMATION PROGRAM
npm run test
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ on: [push, pull_request]
jobs:
Ubuntu:
runs-on: ubuntu-latest
services:
postgres:
image: postgis/postgis:16-3.4
env:
POSTGRES_PASSWORD: root
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- name: Install Backend-Server
run: npm install

- name: Compile Program
run: npm run build

- name: Test Backend-Server
run: npm run test -- --include=fake
- name: Test Packages
run: npm install && npm run test
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ bin/
lib/
node_modules/

*.DS_Store
package-lock.json
.npmrc
*.sh
*.DS_Store
*.log
*.tgz
11 changes: 8 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
bin
dist
lib
node_modules
packages
src/api

packages/*/src/api/functional
packages/*/src/api/typings
packages/*/src/api/utils
packages/*/src/api/*.ts

README.md
tsconfig.json
packages/*/tsconfig.json
48 changes: 48 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Iamport",
"program": "${workspaceRoot}/packages/fake-iamport-server/test/index.ts",
"cwd": "${workspaceRoot}/packages/fake-iamport-server",
"outFiles": ["${workspaceRoot}/packages/fake-iamport-server/lib/**/*.js"],
},
{
"type": "node",
"request": "launch",
"name": "Toss Payments",
"program": "${workspaceRoot}/packages/fake-toss-payments-server/test/index.ts",
"cwd": "${workspaceRoot}/packages/fake-toss-payments-server",
"outFiles": ["${workspaceRoot}/packages/fake-toss-payments-server/lib/**/*.js"],
},
{
"type": "node",
"request": "launch",
"name": "Payment Backend",
"program": "${workspaceRoot}/packages/payment-backend/test/index.ts",
"cwd": "${workspaceRoot}/packages/payment-backend",
"args": [
//----
// Unable to reset DB in debugging mode.
//----
// Therefore, reset DB first by running
// `npm run reset-for-debugging` command,
// and run debugging mode later.
//----
"--reset", "false",

//----
// You can run specific test functions
//----
// "--include", "something",
// "--exclude", "nothing",
],
"outFiles": ["${workspaceRoot}/packages/payment-backend/bin/**/*.js"],
}
]
}
13 changes: 12 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,16 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
}
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
},
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma",
"editor.formatOnSave": true
},
}
Loading
Loading