Skip to content

Commit 6375a79

Browse files
committed
update ci
1 parent 1ee21b7 commit 6375a79

File tree

3 files changed

+116
-22
lines changed

3 files changed

+116
-22
lines changed

.github/workflows/ci-aistor.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: MinIO Rust Library
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
env:
10+
RUST_LOG: debug
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
check-format:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Check format
19+
run: |
20+
cargo fmt --all -- --check
21+
22+
clippy:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: clippy
27+
run: cargo clippy --all-targets --all-features --workspace -- -D warnings
28+
test-multi-thread:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Start AIStor MinIO server
33+
run: |
34+
wget --quiet https://dl.minio.io/aistor/minio/release/linux-amd64/minio
35+
chmod +x minio
36+
echo "MinIO Server Version:"
37+
./minio --version
38+
mkdir -p /tmp/certs
39+
cp ./tests/public.crt ./tests/private.key /tmp/certs/
40+
MINIO_CI_CD=true \
41+
MINIO_LICENSE=${{ secrets.AISTOR_LICENSE }} \
42+
MINIO_NOTIFY_WEBHOOK_ENABLE_miniojavatest=on \
43+
MINIO_NOTIFY_WEBHOOK_ENDPOINT_miniojavatest=http://example.org/ \
44+
./minio server /tmp/test-xl/{1...4}/ --certs-dir /tmp/certs/ &
45+
sleep 10
46+
- name: Run tests
47+
run: |
48+
export SERVER_ENDPOINT=localhost:9000
49+
export ACCESS_KEY=${{ secrets.AISTOR_USER }}
50+
export SECRET_KEY=${{ secrets.AISTOR_LICENSE }}
51+
export ENABLE_HTTPS=1
52+
export MINIO_SSL_CERT_FILE=./tests/public.crt
53+
MINIO_TEST_TOKIO_RUNTIME_FLAVOR="multi_thread" cargo test -- --nocapture
54+
test-current-thread:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
- name: Start AIStor MinIO server
59+
run: |
60+
wget --quiet https://dl.minio.io/aistor/minio/release/linux-amd64/minio
61+
chmod +x minio
62+
echo "MinIO Server Version:"
63+
./minio --version
64+
mkdir -p /tmp/certs
65+
cp ./tests/public.crt ./tests/private.key /tmp/certs/
66+
MINIO_CI_CD=true \
67+
MINIO_LICENSE=${{ secrets.AISTOR_LICENSE }} \
68+
MINIO_NOTIFY_WEBHOOK_ENABLE_miniojavatest=on \
69+
MINIO_NOTIFY_WEBHOOK_ENDPOINT_miniojavatest=http://example.org/ \
70+
./minio server /tmp/test-xl/{1...4}/ --certs-dir /tmp/certs/ &
71+
sleep 10
72+
- name: Run tests
73+
run: |
74+
export SERVER_ENDPOINT=localhost:9000
75+
export ACCESS_KEY=${{ secrets.AISTOR_USER }}
76+
export SECRET_KEY=${{ secrets.AISTOR_LICENSE }}
77+
export ENABLE_HTTPS=1
78+
export MINIO_SSL_CERT_FILE=./tests/public.crt
79+
MINIO_TEST_TOKIO_RUNTIME_FLAVOR="current_thread" cargo test -- --nocapture
80+
81+
build:
82+
runs-on: ubuntu-latest
83+
timeout-minutes: 5
84+
steps:
85+
- uses: actions/checkout@v4
86+
- name: Build
87+
run: |
88+
cargo --version
89+
cargo build --bins --examples --tests --benches --verbose

.github/workflows/rust.yml renamed to .github/workflows/ci-oss.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: MinIO Rust Library
1+
name: MinIO OSS Rust Library
22

33
on:
44
push:
@@ -29,9 +29,21 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- uses: actions/checkout@v4
32+
- name: Start OSS MinIO server
33+
run: |
34+
wget --quiet https://dl.min.io/server/minio/release/linux-amd64/minio
35+
chmod +x minio
36+
echo "MinIO Server Version:"
37+
./minio --version
38+
mkdir -p /tmp/certs
39+
cp ./tests/public.crt ./tests/private.key /tmp/certs/
40+
MINIO_CI_CD=true \
41+
MINIO_NOTIFY_WEBHOOK_ENABLE_miniojavatest=on \
42+
MINIO_NOTIFY_WEBHOOK_ENDPOINT_miniojavatest=http://example.org/ \
43+
./minio server /tmp/test-xl/{1...4}/ --certs-dir /tmp/certs/ &
44+
sleep 10
3245
- name: Run tests
3346
run: |
34-
./tests/start-server.sh
3547
export SERVER_ENDPOINT=localhost:9000
3648
export ACCESS_KEY=minioadmin
3749
export SECRET_KEY=minioadmin
@@ -42,9 +54,21 @@ jobs:
4254
runs-on: ubuntu-latest
4355
steps:
4456
- uses: actions/checkout@v4
57+
- name: Start OSS MinIO server
58+
run: |
59+
wget --quiet https://dl.min.io/server/minio/release/linux-amd64/minio
60+
chmod +x minio
61+
echo "MinIO Server Version:"
62+
./minio --version
63+
mkdir -p /tmp/certs
64+
cp ./tests/public.crt ./tests/private.key /tmp/certs/
65+
MINIO_CI_CD=true \
66+
MINIO_NOTIFY_WEBHOOK_ENABLE_miniojavatest=on \
67+
MINIO_NOTIFY_WEBHOOK_ENDPOINT_miniojavatest=http://example.org/ \
68+
./minio server /tmp/test-xl/{1...4}/ --certs-dir /tmp/certs/ &
69+
sleep 10
4570
- name: Run tests
4671
run: |
47-
./tests/start-server.sh
4872
export SERVER_ENDPOINT=localhost:9000
4973
export ACCESS_KEY=minioadmin
5074
export SECRET_KEY=minioadmin

tests/start-server.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)