-
Notifications
You must be signed in to change notification settings - Fork 110
95 lines (85 loc) · 3.32 KB
/
macos_test.yml
File metadata and controls
95 lines (85 loc) · 3.32 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
87
88
89
90
91
92
93
94
95
name: macos_test
run-name: macos_test [${{ github.event.inputs.arch }}] [${{ github.event.inputs.tag }}]
on:
workflow_dispatch:
inputs:
tag:
description: 'Proton Release tag (eg.v2.5.3)'
required: true
type: string
default: 'latest'
repo:
description: 'Proton repo in Docker Hub'
required: false
default: 'timeplus/proton'
arch:
description: 'Hardware architecture'
required: false
default: arm
type: choice
options:
- x64
- arm
os_version:
description: 'Operation System Version (option: 15,14)'
required: false
type: string
default: '14'
jobs:
smoke_test_on_arm:
if: ${{ github.event.inputs.arch == 'arm' }}
runs-on: macos-${{ inputs.os_version }}
steps:
- name: Checkout
uses: actions/checkout@v5.0.1
- name: Get MacOS info
run: |
sw_vers
uname -a
sysctl -n machdep.cpu.brand_string
- name: Download Release Assets
run: |
export PROTON_VERSION=$TAG
export PROBE_VERSION=v0.1.15
cd $GITHUB_WORKSPACE/tests/cluster/deployment/legacy/
echo ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} >> GH_PERSONAL_ACCESS_TOKEN
gh auth login --with-token < GH_PERSONAL_ACCESS_TOKEN
# download proton binary on macos arm
gh release download $PROTON_VERSION --repo github.com/timeplus-io/proton -p '*-Darwin-arm64'
mv *-Darwin-arm64 proton
chmod +x proton
# download probe binary on macos arm
gh release download $PROBE_VERSION --repo github.com/timeplus-io/probe -p '*_darwin_arm64.zip'
unzip *_darwin_arm64.zip -x README.md
PROBE_BINARY=$(basename *_darwin_arm64.zip .zip)
mv $PROBE_BINARY probe
chmod +x probe
ls -ltrh
- name: Run Tests
timeout-minutes: 5
run: |
export PROTON_VERSION=$TAG
cd $GITHUB_WORKSPACE/tests/cluster/deployment/legacy/
# Start Up Proton
nohup ./proton server start --config-file config_node1.yaml > console_proton1.log 2>&1 &
nohup ./proton server start --config-file config_node2.yaml > console_proton2.log 2>&1 &
nohup ./proton server start --config-file config_node3.yaml > console_proton3.log 2>&1 &
ps -ef | grep proton
# Run Smoke Tests
mkdir log
./probe smoke -v $GITHUB_WORKSPACE/tests/cluster/smoke -d $GITHUB_WORKSPACE/tests/cluster/deployment/local -c p3k1 -k 00_tumble_window_max --collect-only
sleep 5
./probe smoke -v $GITHUB_WORKSPACE/tests/cluster/smoke -d $GITHUB_WORKSPACE/tests/cluster/deployment/local -c p3k1 -k 00_tumble_window_max -f ./log/probe.log
# Collect Log
cat ./log/probe.log
ls -ltrah ./log
echo "==============Smoke Testing Result Summary=============="
if [ ! -f ./log/.status ]; then
echo "test fail with panic or timeout" | tee -a $GITHUB_STEP_SUMMARY
exit 1
elif grep -q "succeed" ./log/.status; then
echo "test succeed" | tee -a $GITHUB_STEP_SUMMARY
else
echo "test failed: 00_tumble_window_max" | tee -a $GITHUB_STEP_SUMMARY
exit 1
fi