chore(deps): bump golang.org/x/net from 0.23.0 to 0.38.0 in /pulsar #13
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| go: [ "1.21", "1.22", "1.23", "1.24" ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| check-latest: true | |
| - name: Verify gofmt | |
| run: | | |
| unformatted=$(gofmt -l .) | |
| if [ -n "$unformatted" ]; then | |
| echo "These files are not gofmt-ed:" | |
| echo "$unformatted" | |
| exit 1 | |
| fi | |
| - name: Vet & test core (zero dependencies) | |
| run: | | |
| go vet ./... | |
| go test -race -count=1 ./... | |
| - name: Build & vet transport modules | |
| run: | | |
| (cd redis && go build ./... && go vet ./...) | |
| (cd amqp && go build ./... && go vet ./...) | |
| # The SQS module's unit + conformance tests are network-free (fake | |
| # client), so they run here across the Go matrix; the live ElasticMQ | |
| # round-trip is `-tags=integration` in the integration job below. | |
| (cd sqs && go build ./... && go vet ./... && go test -race -count=1 ./...) | |
| - name: Build & vet the Azure Service Bus module | |
| # azure-messaging-servicebus requires Go 1.23+, so build/test this module only | |
| # on the matrix entries that satisfy that floor (its unit + conformance tests are | |
| # network-free — a fake client). | |
| if: ${{ matrix.go == '1.23' || matrix.go == '1.24' }} | |
| run: | | |
| (cd azureservicebus && go build ./... && go vet ./... && go test -race -count=1 ./...) | |
| - name: Build & vet the Apache Pulsar module | |
| # The pure-Go pulsar-client-go (no CGo, no libpulsar) sits behind this module's Go | |
| # 1.23 floor, so build/test it only on matrix entries that satisfy it (its unit tests | |
| # are network-free — a fake client). | |
| if: ${{ matrix.go == '1.23' || matrix.go == '1.24' }} | |
| run: | | |
| (cd pulsar && go build ./... && go vet ./... && go test -race -count=1 ./...) | |
| lint: | |
| name: Static analysis (staticcheck) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "stable" | |
| check-latest: true | |
| - name: Install staticcheck | |
| run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
| - name: staticcheck (core + transport modules) | |
| run: | | |
| staticcheck ./... | |
| (cd redis && staticcheck ./...) | |
| (cd amqp && staticcheck ./...) | |
| (cd sqs && staticcheck ./...) | |
| (cd azureservicebus && staticcheck ./...) | |
| (cd pulsar && staticcheck ./...) | |
| coverage: | |
| name: Coverage gate (>=90%) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "stable" | |
| check-latest: true | |
| - name: Core coverage gate | |
| run: bash scripts/check-coverage.sh 90 | |
| integration: | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s --health-timeout 3s --health-retries 5 | |
| rabbitmq: | |
| image: rabbitmq:3 | |
| ports: | |
| - 5672:5672 | |
| options: >- | |
| --health-cmd "rabbitmq-diagnostics -q ping" | |
| --health-interval 10s --health-timeout 5s --health-retries 10 | |
| # Free, SQS-compatible broker for the SQS transport's live round-trip. | |
| # The native image is shell-less, so readiness is polled by a TCP-probe | |
| # step below rather than a container `--health-cmd`. | |
| elasticmq: | |
| image: softwaremill/elasticmq-native:1.6.11 | |
| ports: | |
| - 9324:9324 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "stable" | |
| - name: Redis transport integration tests | |
| working-directory: redis | |
| env: | |
| REDIS_URL: redis://localhost:6379/0 | |
| run: go test -race -count=1 ./... | |
| - name: RabbitMQ transport integration tests | |
| working-directory: amqp | |
| env: | |
| AMQP_URL: amqp://guest:guest@localhost:5672/ | |
| run: go test -race -count=1 ./... | |
| - name: Wait for ElasticMQ | |
| run: | | |
| for i in $(seq 1 30); do | |
| if (echo > /dev/tcp/localhost/9324) >/dev/null 2>&1; then | |
| echo "ElasticMQ port 9324 open"; exit 0 | |
| fi | |
| sleep 2 | |
| done | |
| echo "ElasticMQ did not open port 9324"; exit 1 | |
| - name: Amazon SQS transport integration tests (ElasticMQ) | |
| working-directory: sqs | |
| env: | |
| SQS_ENDPOINT: http://localhost:9324 | |
| AWS_REGION: us-east-1 | |
| AWS_ACCESS_KEY_ID: test | |
| AWS_SECRET_ACCESS_KEY: test | |
| run: go test -tags=integration -race -count=1 ./... | |
| conformance: | |
| name: Conformance suite in sync | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Verify vendored conformance matches the canonical suite | |
| run: | | |
| git clone --depth 1 https://github.com/BabelQueue/conformance.git "$RUNNER_TEMP/conformance" | |
| diff -ru "$RUNNER_TEMP/conformance/manifest.json" "testdata/conformance/manifest.json" | |
| diff -ru "$RUNNER_TEMP/conformance/fixtures" "testdata/conformance/fixtures" | |
| diff -ru "$RUNNER_TEMP/conformance/schema" "testdata/conformance/schema" | |
| echo "Vendored conformance is in sync with the canonical suite." | |
| ci-green: | |
| name: CI green | |
| runs-on: ubuntu-latest | |
| needs: [test, lint, coverage, integration, conformance] | |
| if: ${{ always() }} | |
| steps: | |
| - name: Fail if any required job did not pass | |
| run: | | |
| if ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}; then | |
| echo "A required job failed or was cancelled." | |
| exit 1 | |
| fi |