-
Notifications
You must be signed in to change notification settings - Fork 965
98 lines (87 loc) · 2.99 KB
/
config.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
89
90
91
92
93
94
95
96
97
98
name: "config-test"
on:
push:
branches:
- release-**
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
#The branches below must be a subset of the branches above
branches:
- release-**
paths-ignore:
- 'docs/**'
- '**.md'
workflow_dispatch:
jobs:
config-test:
runs-on: ubuntu-20.04
services:
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps port 6379 on service container to the host
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup minio
run: |
docker run -d -p 9000:9000 --name minio \
-e "MINIO_ACCESS_KEY=minioadmin" \
-e "MINIO_SECRET_KEY=minioadmin" \
-v /tmp/data:/data \
-v /tmp/config:/root/.minio \
minio/minio server /data
sleep 5
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: Build linux target
run: make juicefs
- name: Download tool
run: |
wget -q https://dl.minio.io/client/mc/release/linux-amd64/mc
chmod +x mc
- name: Test
run: |
meta_url=redis://127.0.0.1/1
mount_point=/tmp/sync-test/
./mc config host add minio http://127.0.0.1:9000 minioadmin minioadmin
./mc admin user add minio juicedata juicedata
./mc admin policy attach minio consoleAdmin --user juicedata
./juicefs format --storage minio --bucket http://localhost:9000/jfs-test --access-key juicedata --secret-key juicedata $meta_url myjfs
./juicefs mount $meta_url $mount_point -d --io-retries 1
./mc admin user remove minio juicedata
./mc admin user add minio juicedata1 juicedata1
./mc admin policy attach minio consoleAdmin --user juicedata1
./juicefs config $meta_url --access-key juicedata1 --secret-key juicedata1
sleep 60
echo abc > abc.txt
cp abc.txt $mount_point/abc.txt && echo "write success"
cat $mount_point/abc.txt | grep abc && echo "read success"
- name: log
if: ${{ always() }}
run: |
tail -300 ~/.juicefs/juicefs.log
grep "<FATAL>:" ~/.juicefs/juicefs.log && exit 1 || true
- 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() }}
uses: lhotari/action-upterm@v1