diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ea9bf3..7ae5896 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,16 +18,6 @@ jobs: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - minio: - image: bitnami/minio:latest - env: - MINIO_ROOT_USER: root - MINIO_ROOT_PASSWORD: tembatemba - MINIO_DEFAULT_BUCKETS: temba-archives - ports: - - 9000:9000 - options: --health-cmd "mc ready local" --health-interval 10s --health-timeout 5s --health-retries 5 - steps: - name: Checkout code uses: actions/checkout@v4 @@ -37,6 +27,29 @@ jobs: with: go-version: ${{ env.go-version }} + - name: Run MinIO docker container + run: | + docker run -d --rm \ + -p 9000:9000 \ + -p 9001:9001 \ + --env MINIO_ROOT_USER=root \ + --env MINIO_ROOT_PASSWORD=tembatemba \ + --health-cmd "curl -f http://127.0.0.1:9000/minio/health/live" \ + --health-interval 10s \ + --health-timeout 5s \ + --health-retries 5 \ + minio/minio:RELEASE.2025-07-23T15-54-02Z minio server /data --console-address ":9001" + - name: Install MinIO client + run: | + # Download MinIO client and its checksum + sudo curl -O https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2025-08-13T08-35-41Z + sudo curl -O https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2025-08-13T08-35-41Z.sha256sum + sha256sum -c mc.RELEASE.2025-08-13T08-35-41Z.sha256sum + sudo chmod +x mc.RELEASE.2025-08-13T08-35-41Z + sudo mv mc.RELEASE.2025-08-13T08-35-41Z /usr/local/bin/mc + mc alias set local http://127.0.0.1:9000 root tembatemba + mc ls local/temba-archives || mc mb local/temba-archives + - name: Run tests run: go test -p=1 -coverprofile=coverage.text -covermode=atomic ./...