Skip to content

Prep for 0.4.0 rc3

Prep for 0.4.0 rc3 #23

Workflow file for this run

name: Test S3
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
s3:
name: Test S3 functionality
runs-on: ubuntu-latest
env:
MINIO_ROOT_USER: admin
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:
python-version: "3.10"
- name: Install minio and mcli
run: |
apt update && apt install -y tmux wget
wget https://dl.min.io/server/minio/release/linux-amd64/minio -O /usr/local/bin/minio
wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /usr/local/bin/mcli
chmod +x /usr/local/bin/minio
chmod +x /usr/local/bin/mcli
- name: Start minio in tmux
run: |
tmux new -d -s minio
tmux send-keys -t minio "MINIO_ROOT_USER=$MINIO_ROOT_USER MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD minio server /tmp/minio --console-address :9001" Enter
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 '.[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