Skip to content

Commit

Permalink
test(ci): add minio to new test action
Browse files Browse the repository at this point in the history
run ci on this branch

move command ot options

use compose file approach

sleep until minio is ready

move pw setup to later
  • Loading branch information
jhamman committed Sep 23, 2024
1 parent e03d943 commit d60a394
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test

on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize, labeled]

push:
branches:
- main
- test/ci-with-minio

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ['3.11']
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Stand up MinIO
run: |
docker compose up -d minio
- name: Wait for MinIO to be ready
run: |
for i in {1..10}; do
if curl --silent --fail http://minio:9000/minio/health/live; then
break
fi
sleep 3
done
docker compose exec -T minio mc alias set minio http://minio:9000 minio123 minio123
- name: Use Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
25 changes: 25 additions & 0 deletions compose.yaml
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'

0 comments on commit d60a394

Please sign in to comment.