-
Notifications
You must be signed in to change notification settings - Fork 18
85 lines (74 loc) · 2.92 KB
/
cloud_nodejs_client_test.yaml
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
name: Cloud test with nodejs client
on:
workflow_dispatch:
inputs:
organization_name:
description: Default is hazelcast, but if you would like to run the workflow with your forked repo, set your github username
required: true
default: hazelcast
branch_name:
description: Name of the branch to test client from
required: true
default: master
base_url:
description: Base url of the cloud env. I.e https://api.dev.viridian.hazelcast.cloud
required: true
default: https://api.dev.viridian.hazelcast.cloud
hzVersion:
description: Hazelcast cluster version
required: true
jobs:
test_cloud_nodejs:
runs-on: ubuntu-latest
name: Cloud tests with nodejs
steps:
- name: Checkout to scripts
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Read Java Config
run: cat ${{ github.workspace }}/.github/java-config.env >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Checkout to ${{ github.event.inputs.branch_name }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.organization_name }}/hazelcast-nodejs-client
path: client
ref: ${{ github.event.inputs.branch_name }}
- name: Install dependencies and compile client
run: |
npm install
npm run compile
working-directory: client
- name: Copy required files to test folders
run: |
cp -a $GITHUB_WORKSPACE/client/lib $GITHUB_WORKSPACE/HazelcastCloudTests/nodejshazelcastcloudtests/lib
cp -a $GITHUB_WORKSPACE/client/node_modules $GITHUB_WORKSPACE/HazelcastCloudTests/nodejshazelcastcloudtests/node_modules
cp -a $GITHUB_WORKSPACE/client/package.json $GITHUB_WORKSPACE/HazelcastCloudTests/nodejshazelcastcloudtests/
cp -a $GITHUB_WORKSPACE/client/package-lock.json $GITHUB_WORKSPACE/HazelcastCloudTests/nodejshazelcastcloudtests/
- name: Start RC for Viridian
env:
BASE_URL: ${{ github.event.inputs.base_url }}
API_KEY: ${{ secrets.APIKEY_VIRIDIAN }}
API_SECRET: ${{ secrets.APISECRET_VIRIDIAN }}
run: |
python start_remote_controller.py &> rc.log &
sleep 30
- name: Run cloud tests
env:
BASE_URL: ${{ github.event.inputs.base_url }}
HZ_VERSION: ${{ github.event.inputs.hzVersion }}
run: |
npx mocha cloud_tests.js --exit
working-directory: HazelcastCloudTests/nodejshazelcastcloudtests
- uses: actions/upload-artifact@v2
if: always()
with:
name: rc
path: rc.log