Skip to content

Commit e5b9bbc

Browse files
committed
[add] Test cases of User controller
[optimize] update Deployment configuration & Upstream packages
1 parent 9b89fbf commit e5b9bbc

File tree

12 files changed

+345
-196
lines changed

12 files changed

+345
-196
lines changed

.dockerignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
ReadMe.md
22
node_modules/
33
dist/
4-
.data/
4+
.*/
55
start.sh
6-
.husky/
7-
.github/
8-
.vscode/
6+
.eslintrc.json
97
*.pem

.github/workflows/deploy-production.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,27 @@ jobs:
4747
mv ${{ env.ARTIFACT_PATH }} ./docker-compose.yml ./start.sh ./build
4848
4949
- name: Transport Image
50-
uses: garygrossgarten/github-action-scp@release
50+
uses: appleboy/scp-action@v0.1.7
5151
if: ${{ env.HOST }}
5252
with:
53-
local: ./build
54-
remote: /tmp
53+
source: ./build/*.*
54+
target: /tmp/${{ env.BOX_NAME }}
5555
host: ${{ secrets.HOST }}
5656
username: ${{ secrets.USER }}
57-
privateKey: ${{ secrets.SSH_KEY }}
57+
password: ${{ secrets.SSH_KEY }}
58+
strip_components: 1
5859

5960
- name: Run Image
6061
uses: garygrossgarten/github-action-ssh@release
6162
if: ${{ env.HOST }}
6263
with:
6364
host: ${{ secrets.HOST }}
6465
username: ${{ secrets.USER }}
65-
privateKey: ${{ secrets.SSH_KEY }}
66+
password: ${{ secrets.SSH_KEY }}
6667
command: |
67-
mv /tmp/docker-compose.yml /tmp/start.sh ~/
68-
chmod +x ~/start.sh
69-
sudo ~/start.sh ${{ env.ARTIFACT_PATH }}
68+
mkdir -p ~/${{ env.BOX_NAME }}
69+
cd /tmp/${{ env.BOX_NAME }}
70+
mv docker-compose.yml start.sh ~/${{ env.BOX_NAME }}
71+
cd ~/${{ env.BOX_NAME }}
72+
chmod +x start.sh
73+
echo '${{ secrets.SSH_KEY }}' | sudo -S ./start.sh /tmp/${{ env.BOX_NAME }}/${{ env.ARTIFACT_PATH }}

.github/workflows/publish-type.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ jobs:
2020
node-version: 20
2121
registry-url: https://npm.pkg.github.com
2222
cache: pnpm
23+
- name: Inject Environment variables
24+
run: |
25+
cat > .env <<EOF
26+
${{ secrets.ENV_FILE }}
27+
EOF
2328
- name: Install, Build & Publish
2429
run: |
2530
pnpm i && npm test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules/
22
package-lock.json
3+
yarn.lock
34
dist/
45
type/*.d.ts
56
.env*

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kaiyuanshe/openhackathon-service",
3-
"version": "0.21.0",
3+
"version": "0.21.1",
44
"license": "LGPL-3.0",
55
"author": "shiy2008@gmail.com",
66
"description": "RESTful API service scaffold based on Node.js & TypeScript",
@@ -25,7 +25,7 @@
2525
"koa-mount": "^4.0.0",
2626
"koa2-swagger-ui": "^5.10.0",
2727
"koagger": "^0.3.0",
28-
"marked": "^14.1.1",
28+
"marked": "^14.1.2",
2929
"mobx-github": "^0.3.4",
3030
"mobx-restful": "^1.0.1",
3131
"pg": "^8.12.0",
@@ -44,8 +44,8 @@
4444
"@types/koa": "^2.15.0",
4545
"@types/koa-logger": "^3.1.5",
4646
"@types/node": "^20.16.5",
47-
"@typescript-eslint/eslint-plugin": "^8.4.0",
48-
"@typescript-eslint/parser": "^8.4.0",
47+
"@typescript-eslint/eslint-plugin": "^8.5.0",
48+
"@typescript-eslint/parser": "^8.5.0",
4949
"eslint": "^8.57.0",
5050
"eslint-plugin-simple-import-sort": "^12.1.1",
5151
"get-git-folder": "^0.1.2",
@@ -55,10 +55,10 @@
5555
"lint-staged": "^15.2.10",
5656
"prettier": "^3.3.3",
5757
"sqlite3": "^5.1.7",
58-
"start-server-and-test": "^2.0.5",
58+
"start-server-and-test": "^2.0.7",
5959
"ts-jest": "^29.2.5",
6060
"ts-node": "^10.9.2",
61-
"typescript": "~5.5.4"
61+
"typescript": "~5.6.2"
6262
},
6363
"resolutions": {
6464
"native-file-system-adapter": "npm:@tech_query/native-file-system-adapter@^3.0.1"

0 commit comments

Comments
 (0)