+28
-20
@@ -26,20 +26,30 @@ jobs:
|
|||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
# Garage S3 service - just like in docker-compose!
|
||||||
# Use fake-s3 instead of MinIO - simpler and more reliable
|
garage:
|
||||||
s3:
|
image: dxflrs/garage:v2.3.0
|
||||||
image: adobe/s3mock:latest
|
|
||||||
env:
|
env:
|
||||||
initialBuckets: soaricarus-ci-bucket
|
GARAGE_SERVER_BIND_ADDR: "0.0.0.0:3900"
|
||||||
defaultRegion: ${{ secrets.GARAGE_REGION }}
|
GARAGE_S3_API_BIND_ADDR: "0.0.0.0:3900"
|
||||||
|
GARAGE_CLUSTER_REPLICATION_MODE: "none"
|
||||||
|
GARAGE_RPC_SECRET: "w03ABWJDfYsrkd+WpT/7G7gVkFCJQi+MGt/+1nyy0hc="
|
||||||
|
GARAGE_ADMIN_TOKEN: "test-admin-token"
|
||||||
|
GARAGE_DEFAULT_ACCESS_KEY: "test"
|
||||||
|
GARAGE_DEFAULT_SECRET_KEY: "test"
|
||||||
|
GARAGE_DEFAULT_BUCKET: "soaricarus-ci-bucket"
|
||||||
|
GARAGE_S3_REGION: "us-east-1"
|
||||||
|
GARAGE_DATA_DIR: "/data"
|
||||||
|
GARAGE_METADATA_DIR: "/data/meta"
|
||||||
ports:
|
ports:
|
||||||
- 9090:9090
|
- 3900:3900
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd "curl -f http://localhost:9090/ || exit 1"
|
--health-cmd "curl -f http://localhost:3900/ || exit 1"
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
command: ["/garage", "server", "--single-node", "--default-bucket"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
@@ -60,19 +70,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup S3
|
- name: Setup S3
|
||||||
run: |
|
run: |
|
||||||
# No need to install mc or create bucket - S3Mock creates it automatically!
|
sudo apt update
|
||||||
echo "S3_BUCKET_NAME=soaricarus-ci-bucket" >> $GITHUB_ENV
|
sudo apt install curl unzip -y
|
||||||
echo "S3_ENDPOINT_URL=http://localhost:9090" >> $GITHUB_ENV
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||||
echo "AWS_ACCESS_KEY_ID=test" >> $GITHUB_ENV
|
unzip awscliv2.zip
|
||||||
echo "AWS_SECRET_ACCESS_KEY=test" >> $GITHUB_ENV
|
sudo ./aws/install
|
||||||
echo "AWS_DEFAULT_REGION=us-east-1" >> $GITHUB_ENV
|
aws --version
|
||||||
|
# Garage is accessible at localhost:3900
|
||||||
|
curl -v http://localhost:3900
|
||||||
|
|
||||||
# Test connection to S3Mock
|
# Create bucket
|
||||||
curl -v http://localhost:9090 || echo "S3Mock not responding"
|
aws --endpoint-url=http://localhost:3900 s3 mb s3://soaricarus-ci-bucket --region us-east-1
|
||||||
env:
|
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.GARAGE_KEY_ID }}
|
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.GARAGE_SECRET }}
|
|
||||||
AWS_DEFAULT_REGION: ${{ secrets.GARAGE_REGION }}
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user