-
Notifications
You must be signed in to change notification settings - Fork 59
80 lines (67 loc) · 2.12 KB
/
ci-environment-tests.yml
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
name: CI Environment Tests
on:
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
env: # Set the environment variable for all steps in this job
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
VITE_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- name: Checkout KaibanJS Library
uses: actions/checkout@v2
with:
repository: kaiban-ai/KaibanJS
path: kaibanjs
- name: Checkout KaibanJS-React-Vite Repository
uses: actions/checkout@v2
with:
repository: darielnoel/KaibanJS-React-Vite
token: ${{ secrets.GITHUB_TOKEN }} # This is needed to access the repository
path: react-vite-app
- name: Checkout KaibanJS-NodeJS Repository
uses: actions/checkout@v2
with:
repository: darielnoel/KaibanJS-NodeJS
token: ${{ secrets.GITHUB_TOKEN }} # This is needed to access the repository
path: kaibanjs-nodejs
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Build and Pack KaibanJS Library
run: |
cd kaibanjs
npm install
npm run build
npm pack
id: kaibanjs-build
- name: Install other dependencies for React + Vite App
run: |
cd react-vite-app
npm install
- name: Install KaibanJS in React + Vite App using Pack
run: |
cd react-vite-app
npm install ../kaibanjs/*.tgz
- name: Build React + Vite App
run: |
cd react-vite-app
npm run build
# - name: Run tests for React + Vite App
# run: |
# cd react-vite-app
# npm test
# Handle NodeJS App after React + Vite App
- name: Install other dependencies for NodeJS App
run: |
cd kaibanjs-nodejs
npm install
- name: Install KaibanJS in NodeJS App using Pack
run: |
cd kaibanjs-nodejs
npm install ../kaibanjs/*.tgz
- name: Test NodeJS App
run: |
cd kaibanjs-nodejs
npm test