Skip to content

Commit

Permalink
Run S3 tests in CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
aliddell committed Aug 1, 2024
1 parent f196344 commit bc035a3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ jobs:
MINIO_ROOT_PASSWORD: password
MINIO_URL: http://localhost:9000
MINIO_ALIAS: myminio
MINIO_BUCKET: acquire-test
MINIO_ACCESS_KEY: acquire
MINIO_SECRET_KEY: 12345678

steps:
- uses: actions/checkout@v3
with:
submodules: true
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
Expand All @@ -42,3 +47,20 @@ jobs:
sleep 5
mcli alias set $MINIO_ALIAS $MINIO_URL $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD
mcli admin user svcacct add --access-key $MINIO_ACCESS_KEY --secret-key $MINIO_SECRET_KEY $MINIO_ALIAS $MINIO_ROOT_USER
- name: Create a bucket
run: |
mcli mb $MINIO_ALIAS/$MINIO_BUCKET
- name: Install
run: |
pip install --upgrade pip
pip install -e '.[testing]'
- name: Test
run: |
echo "ZARR_S3_ENDPOINT=$MINIO_URL" > .env
echo "ZARR_S3_BUCKET_NAME=$MINIO_BUCKET" >> .env
echo "ZARR_S3_ACCESS_KEY_ID=$MINIO_ACCESS_KEY" >> .env
echo "ZARR_S3_SECRET_ACCESS_KEY=$MINIO_SECRET_KEY" >> .env
python -m pytest -k test_write_zarr_to_s3

0 comments on commit bc035a3

Please sign in to comment.