rename ci->rust.yml

This commit is contained in:
Harshavardhana 2022-08-22 19:03:24 -07:00
parent 0fb80e1456
commit 20c0150d3d
4 changed files with 63 additions and 39 deletions

View File

@ -1,39 +0,0 @@
name: MinIO Rust Library
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
- name: Check style
run: |
cargo fmt --all -- --check
- name: Start MinIO server
run: |
wget --quiet https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
mkdir -p ~/.minio/certs
cp ./tests/public.crt ./tests/private.key ~/.minio/certs/
sudo cp ./tests/public.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
MINIO_CI_CD=true ./minio server /tmp/test-xl/{1...4}/ &
sleep 10
- name: Run tests
run: |
SERVER_ENDPOINT=https://localhost:9000/ ACCESS_KEY=minioadmin SECRET_KEY=minioadmin cargo test --verbose -- --nocapture

30
.github/workflow/rust.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: MinIO Rust Library
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and Check style
run: |
cargo build --verbose
cargo fmt --all -- --check
- name: Run tests
run: |
./start-server.sh
export SERVER_ENDPOINT=https://localhost:9000/
export ACCESS_KEY=minioadmin
export SECRET_KEY=minioadmin
cargo test --verbose -- --nocapture

22
.github/workflows/rust.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

11
start-server.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
wget --quiet https://dl.min.io/server/minio/release/linux-amd64/minio && \
chmod +x minio && \
mkdir -p ~/.minio/certs && \
cp ./tests/public.crt ./tests/private.key ~/.minio/certs/ && \
sudo cp ./tests/public.crt /usr/local/share/ca-certificates/ && \
sudo update-ca-certificates
MINIO_CI_CD=true ./minio server /tmp/test-xl/{1...4}/ &
sleep 10