Minio testing #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
push: | |
branches: [ "main", "ubuntu" ] | |
pull_request: | |
branches: [ "main", "ubuntu" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
minio: | |
image: quay.io/minio/minio:latest | |
options: >- | |
--name minio | |
-e AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE | |
-e AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY | |
quay.io/minio/minio server /data | |
ports: | |
- 9000:9000 # MinIO API port | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Wait for MinIO to start | |
run: | | |
# Wait for MinIO to be ready by checking if it responds on port 9000 | |
for i in {1..30}; do | |
if curl -s http://localhost:9000; then | |
echo "MinIO is up!" | |
break | |
fi | |
echo "Waiting for MinIO to be ready..." | |
sleep 5 | |
done | |
if [ $i -eq 30 ]; then | |
echo "MinIO did not start in time, failing the test." | |
exit 1 | |
fi | |
- name: Test | |
run: dotnet test --no-build --verbosity normal |