build(deps): bump the go group with 8 updates #21
Workflow file for this run
This file contains hidden or 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
| name: End-to-end tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| e2e: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| backend: [file, s3, azure, gcs] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Checkout code | |
| uses: actions/checkout@v6 | |
| - | |
| name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: stable | |
| - | |
| name: Set tusd output | |
| run: | | |
| echo "TUSD_BINARY=$PWD/tusd" >> $GITHUB_ENV | |
| - | |
| name: Build tusd | |
| run: | | |
| go build -o $TUSD_BINARY ./cmd/tusd/main.go | |
| # --- S3 (MinIO) --- | |
| - | |
| name: Start MinIO | |
| if: matrix.backend == 's3' | |
| run: | | |
| docker run -d -p 9000:9000 \ | |
| -e MINIO_ROOT_USER=minioadmin \ | |
| -e MINIO_ROOT_PASSWORD=minioadmin \ | |
| --name minio \ | |
| minio/minio server /data | |
| for i in $(seq 1 30); do | |
| if curl -s http://localhost:9000/minio/health/live > /dev/null 2>&1; then | |
| break | |
| fi | |
| if [ "$i" -eq 30 ]; then exit 1; fi | |
| sleep 1 | |
| done | |
| - | |
| name: Create S3 bucket | |
| if: matrix.backend == 's3' | |
| run: | | |
| docker run --rm \ | |
| -e AWS_ACCESS_KEY_ID=minioadmin \ | |
| -e AWS_SECRET_ACCESS_KEY=minioadmin \ | |
| -e AWS_DEFAULT_REGION=us-east-1 \ | |
| --add-host=host.docker.internal:host-gateway \ | |
| amazon/aws-cli s3 mb s3://e2e --endpoint-url http://host.docker.internal:9000 | |
| - | |
| name: Set S3 env | |
| if: matrix.backend == 's3' | |
| run: | | |
| echo "AWS_ACCESS_KEY_ID=minioadmin" >> $GITHUB_ENV | |
| echo "AWS_SECRET_ACCESS_KEY=minioadmin" >> $GITHUB_ENV | |
| echo "AWS_REGION=us-east-1" >> $GITHUB_ENV | |
| echo "TUSD_EXTRA_ARGS=-s3-bucket=e2e -s3-endpoint=http://localhost:9000 -s3-disable-ssl" >> $GITHUB_ENV | |
| # --- Azure (Azurite) --- | |
| - | |
| name: Start Azurite | |
| if: matrix.backend == 'azure' | |
| run: | | |
| docker run -d -p 10000:10000 \ | |
| --name azurite \ | |
| mcr.microsoft.com/azure-storage/azurite azurite-blob --blobHost 0.0.0.0 --skipApiVersionCheck | |
| for i in $(seq 1 30); do | |
| if curl -s -o /dev/null http://127.0.0.1:10000/devstoreaccount1?restype=account; then | |
| break | |
| fi | |
| if [ "$i" -eq 30 ]; then exit 1; fi | |
| sleep 1 | |
| done | |
| - | |
| name: Create Azure container | |
| if: matrix.backend == 'azure' | |
| run: | | |
| docker run --rm \ | |
| --add-host=host.docker.internal:host-gateway \ | |
| mcr.microsoft.com/azure-cli az storage container create -n e2e --connection-string "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://host.docker.internal:10000/devstoreaccount1;" | |
| - | |
| name: Set Azure env | |
| if: matrix.backend == 'azure' | |
| run: | | |
| echo "AZURE_STORAGE_ACCOUNT=devstoreaccount1" >> $GITHUB_ENV | |
| echo "AZURE_STORAGE_KEY=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" >> $GITHUB_ENV | |
| echo "TUSD_EXTRA_ARGS=-azure-storage=e2e -azure-endpoint=http://127.0.0.1:10000/devstoreaccount1" >> $GITHUB_ENV | |
| # --- GCS (fake-gcs-server) --- | |
| - | |
| name: Start fake-gcs-server | |
| if: matrix.backend == 'gcs' | |
| run: | | |
| mkdir -p gcs-data/e2e | |
| docker run -d -p 4443:4443 -v $PWD/gcs-data:/storage --name fake-gcs \ | |
| fsouza/fake-gcs-server -scheme http | |
| for i in $(seq 1 30); do | |
| if curl -s -o /dev/null http://127.0.0.1:4443/storage/v1/b; then | |
| break | |
| fi | |
| if [ "$i" -eq 30 ]; then exit 1; fi | |
| sleep 1 | |
| done | |
| - | |
| name: Set GCS env | |
| if: matrix.backend == 'gcs' | |
| run: | | |
| echo "STORAGE_EMULATOR_HOST=http://127.0.0.1:4443" >> $GITHUB_ENV | |
| echo "TUSD_EXTRA_ARGS=-gcs-bucket=e2e -gcs-endpoint=http://127.0.0.1:4443/storage/v1/" >> $GITHUB_ENV | |
| # --- Run tests --- | |
| - | |
| name: Run e2e tests | |
| run: | | |
| go test -race ./internal/e2e/... |