APPS-1919 Improve log output (#20) #297
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| workflow_call: | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| # Aerospike service container | |
| aerospike: | |
| image: aerospike/aerospike-server-enterprise:8.0.0.7 | |
| ports: | |
| - 3000:3000 | |
| - 3001:3001 | |
| - 3002:3002 | |
| # Fake GCS server | |
| fake-gcs-server: | |
| image: fsouza/fake-gcs-server:1.52.2 | |
| ports: | |
| - 4443:4443 | |
| options: >- | |
| --entrypoint sh | |
| fsouza/fake-gcs-server:1.52.2 | |
| -c "/bin/fake-gcs-server -data /data -scheme http -public-host 127.0.0.1:4443" | |
| # Azurite | |
| azurite: | |
| image: mcr.microsoft.com/azure-storage/azurite:3.34.0 | |
| ports: | |
| - 10000:10000 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get go version from go.mod | |
| run: | | |
| echo "GO_VERSION=$(grep '^go ' go.mod | cut -d " " -f 2)" >> $GITHUB_ENV | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: true | |
| - name: Set up Minio | |
| run: | | |
| docker run -d \ | |
| -p 9000:9000 \ | |
| --name minio \ | |
| -e "MINIO_ROOT_USER=minioadmin" \ | |
| -e "MINIO_ROOT_PASSWORD=minioadminpassword" \ | |
| -e "MINIO_ACCESS_KEY=minioadmin" \ | |
| -e "MINIO_SECRET_KEY=minioadminpassword" \ | |
| -e "MINIO_BROWSER=off" \ | |
| minio/minio:latest server /data \ | |
| && until (curl -I http://127.0.0.1:9000/minio/health/live | grep "OK"); do echo "Waiting for MinIO server to be ready..."; sleep 3; done \ | |
| && docker exec minio sh -c "mc alias set myminio http://127.0.0.1:9000 minioadmin minioadminpassword && mc mb myminio/backup && mc mb myminio/asbackup \ | |
| && mc anonymous set upload myminio/backup && mc anonymous set download myminio/backup && mc anonymous set public myminio/backup \ | |
| && mc anonymous set upload myminio/asbackup && mc anonymous set download myminio/asbackup && mc anonymous set public myminio/asbackup" | |
| - name: Test with coverage | |
| run: | | |
| make coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{secrets.CODECOV_TOKEN}} | |
| files: coverage.cov | |
| verbose: false |