-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,36 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: [opened, reopened, synchronize, labeled] | ||
|
||
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 | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ['3.11'] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Git checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Wait for MinIO to be ready | ||
- name: Standup MongoDB, MinIO and Arraylake API | ||
run: | | ||
for i in {1..10}; do | ||
if curl --silent --fail http://localhost:9000/minio/health/live; then | ||
break | ||
fi | ||
sleep 3 | ||
done | ||
docker compose up -d minio | ||
docker compose exec -T minio mc alias set minio http://minio:9000 minio123 minio123 | ||
- 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 | ||
- name: Use Python ${{ matrix.python-version }} | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
volumes: | ||
minio_data: | ||
|
||
services: | ||
minio: | ||
container_name: minio | ||
image: quay.io/minio/minio | ||
entrypoint: | | ||
/bin/sh -c ' | ||
for bucket in testbucket externalbucket arraylake-repo-bucket | ||
do | ||
echo creating bucket "$$bucket"; | ||
mkdir -p /data/"$$bucket" | ||
done; | ||
/usr/bin/minio server --console-address ":9001" /data | ||
' | ||
environment: | ||
- MINIO_ROOT_USER=minio123 | ||
- MINIO_ROOT_PASSWORD=minio123 | ||
volumes: | ||
- minio_data:/data | ||
ports: | ||
- '9000:9000' | ||
- '9001:9001' |