-
Notifications
You must be signed in to change notification settings - Fork 20
57 lines (50 loc) · 1.42 KB
/
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
name: Test
on:
push:
branches:
- main
- test/ci-with-minio
pull_request:
jobs:
minio-test:
runs-on: ubuntu-latest
services:
minio:
image: quay.io/minio/minio
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- 9000:9000
options: >-
--health-cmd="curl --silent --fail http://localhost:9000/minio/health/live || exit 1"
--health-interval=5s
--health-timeout=10s
--health-retries=5
server /data
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Wait for MinIO to be ready
run: |
for i in {1..10}; do
if curl --silent --fail http://localhost:9000/minio/health/live; then
break
fi
sleep 3
done
- name: Install MinIO client (mc)
run: |
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo mv mc /usr/local/bin/
- name: Create test bucket
run: |
mc alias set minio http://localhost:9000 minioadmin minioadmin
mc mb minio/test-bucket
- name: Run tests
run: |
# Add commands to run your tests here
echo "Running tests against MinIO..."
# Example:
# pytest --minio-endpoint http://localhost:9000 --bucket test-bucket