-
Notifications
You must be signed in to change notification settings - Fork 211
86 lines (68 loc) · 2.2 KB
/
release.yml
File metadata and controls
86 lines (68 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
on:
push:
branches:
- "release"
jobs:
Frontend-Tests:
name: Frontend Tests
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- name: 🔎 Check out repository code ...
uses: actions/checkout@v4
- name: ⏳ Setting Up Node ...
uses: actions/setup-node@v4
with:
node-version: "20.18.1"
- name: ⏳ setting environment ...
run: npm i
- name: 🖥 typecheck Widget ...
run: cd widget && npm run typecheck
- name: 🖥 typecheck Frontend ...
run: cd frontend && npm run typecheck
- name: 🖋️ ESLint checks for widget ...
run: cd widget && npx lint-staged
- name: 🖋️ ESLint checks for Frontend ...
run: cd frontend && npx lint-staged
- name: 🛠️ build Widget ...
run: cd widget && npm run build
- name: 🛠️ build Frontend ...
run: cd frontend && npm run build
API-Tests:
name: API Tests
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- name: 🔎 Check out repository code ...
uses: actions/checkout@v4
- name: ⏳ Setting Up Node ...
uses: actions/setup-node@v4
with:
node-version: "20.18.1"
- name: ⏳ setting environment for API ...
run: cd api && npm i
- name: 🖥 typecheck API ...
run: cd api && npm run typecheck
- name: 🖋️ ESLint checks for API ...
run: cd api && npx lint-staged
- name: 🔬 running unit tests for API ...
run: cd api && npm run test
build:
name: Build (Release Branch)
runs-on: ubuntu-latest
needs: [Frontend-Tests, API-Tests] # Ensure build runs only if tests pass
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: executing remote ssh commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
username: ${{ secrets.SSH_USER }}
script: |
cd /home/***/hexabot
git checkout release
git pull origin release
npx hexabot stop --enable=nlu
npx hexabot start --enable=nlu