-
Notifications
You must be signed in to change notification settings - Fork 964
88 lines (78 loc) · 2.34 KB
/
sdktest.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
81
82
83
84
85
86
87
88
name: "sdktest"
on:
push:
branches:
- 'main'
- 'release-*'
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
#The branches below must be a subset of the branches above
branches:
- 'main'
- 'release-*'
paths-ignore:
- 'docs/**'
- '**.md'
- '.github/**'
workflow_dispatch:
inputs:
debug:
type: boolean
description: "Run the build with tmate debugging enabled"
required: false
default: false
jobs:
sdktest:
timeout-minutes: 50
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
- name: Run Redis
run: |
sudo docker run -d --name redis -v redis-data:/data \
-p 6379:6379 redis redis-server --appendonly yes
- name: Juicefs Format
run: |
sudo ./juicefs format localhost dev
- name: Juicefs Mount
run: |
sudo ./juicefs mount -d localhost /jfs
touch /jfs/inner_sym_target
echo "hello juicefs" > /jfs/inner_sym_target
cd /jfs
ln -s inner_sym_target inner_sym_link
mkdir etc
chmod 777 etc
echo `hostname` > etc/nodes
- name: Sdk Test
run: |
make -C sdk/java/libjfs
cd sdk/java
sudo mvn test -B
sudo mvn test -B -Dflink.version=1.17.2 -Dtest=io.juicefs.JuiceFileSystemTest#testFlinkHadoopRecoverableWriter
sudo mvn package -B -Dmaven.test.skip=true --quiet -Dmaven.javadoc.skip=true
expect=$(git rev-parse --short HEAD | cut -b 1-7)
ls /tmp/libjfs* | grep $expect
- name: Send Slack Notification
if: failure()
uses: juicedata/slack-notify-action@main
with:
channel-id: "${{ secrets.SLACK_CHANNEL_ID_FOR_PR_CHECK_NOTIFY }}"
slack_bot_token: "${{ secrets.SLACK_BOT_TOKEN }}"
- name: Setup upterm session
if: failure() && (github.event.inputs.debug == 'true' || github.run_attempt != 1)
timeout-minutes: 60
uses: lhotari/action-upterm@v1