Skip to content

Commit

Permalink
hepp
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Dec 28, 2024
1 parent 1ae608b commit bfce1a2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,7 @@ jobs:
http://127.0.0.1:8081/storage/v1/b?project=sitespeed
- name: Setup minio/S3 container
run: |
docker run -d -p 9000:9000 -p 9001:9001 -e MINIO_ROOT_USER=user -e MINIO_ROOT_PASSWORD=password minio/minio:RELEASE.2024-05-10T01-41-38Z server /data --console-address ":9001"
docker run --rm --network host minio/mc:RELEASE.2024-10-08T09-37-26Z alias set myminio http://localhost:9000 user password
docker run --rm --network host minio/mc:RELEASE.2024-10-08T09-37-26Z mb --region=motown myminio/mybucket || echo "Bucket already exists"
docker run --rm --network host minio/mc:RELEASE.2024-10-08T09-37-26Z alias list
docker run --rm --network host minio/mc:RELEASE.2024-10-08T09-37-26Z ls myminio/testbucket
docker logs minio
docker run --rm --network host minio/mc:RELEASE.2024-10-08T09-37-26Z anonymous set public myminio/mybucket
docker run --rm --network host minio/mc:RELEASE.2024-10-08T09-37-26Z ls myminio/mybucket
docker compose -f test/docker/docker-compose.minio.yml up -d
- name: Install local HTTP server
run: npm install serve -g
- name: Start local HTTP server
Expand All @@ -54,4 +47,4 @@ jobs:
- name: Run Chrome test sending data to GCS
run: STORAGE_EMULATOR_HOST="http://localhost:8081" node bin/sitespeed.js http://127.0.0.1:3001/simple/ --xvfb -n 1 --gcs.bucketname sitespeed --gcs.projectId sitespeed
- name: Run Chrome test sending data to S3
run: node bin/sitespeed.js http://127.0.0.1:3001/simple/ --xvfb -n 1 --s3.endpoint http://127.0.0.1:9000 --s3.bucketname mybucket --s3.key user --s3.secret password --s3.region motown
run: node bin/sitespeed.js http://127.0.0.1:3001/simple/ --xvfb -n 1 --s3.endpoint http://127.0.0.1:9000 --s3.bucketname sitespeedio --s3.key user --s3.secret password --s3.region motown
32 changes: 32 additions & 0 deletions test/docker/docker-compose.minio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
services:
minio:
image: minio/minio:RELEASE.2024-05-10T01-41-38Zs
volumes:
- minio-data:/data
ports:
- "9000:9000"
environment:
- MINIO_ROOT_USER=user
- MINIO_ROOT_PASSWORD=password
command: server /data --console-address ":9001"
networks:
- skynet
mc:
image: minio/mc:RELEASE.2024-10-08T09-37-26Z
depends_on:
- minio
networks:
- skynet
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set sitespeedio http://minio:9000 user password &&
(/usr/bin/mc mb --region=motown sitespeedio/sitespeedio || echo 'Bucket already exists') &&
/usr/bin/mc ilm rule add --expire-days 30 sitespeedio/sitespeedio &&
/usr/bin/mc anonymous set public sitespeedio/sitespeedio &&
/usr/bin/mc admin config set sitespeedio compression extensions=\".html,.css,.js\" &&
echo 'MinIO and lifecycle policy setup complete.'"
volumes:
minio-data:
networks:
skynet:
name: skynet

0 comments on commit bfce1a2

Please sign in to comment.