fix(deps): update spring boot to v3.5.4 #29
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: spring-kafka-example CI Build | |
| on: | |
| pull_request: | |
| branches: [master] | |
| paths: | |
| - "spring-kafka-example/**" | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| jobs: | |
| integration-tests: | |
| name: Run Unit & Integration Tests | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: spring-kafka-example | |
| strategy: | |
| matrix: | |
| distribution: [ 'temurin' ] | |
| java: [ '21' ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/[email protected] | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: ${{ matrix.distribution }} | |
| cache: 'maven' | |
| - name: Build and analyze | |
| run: ./mvnw clean verify | |
| health-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository and submodules | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Start containers with Compose Action | |
| uses: hoverkraft-tech/[email protected] | |
| with: | |
| compose-file: './spring-kafka-example/compose.yaml' | |
| services: | | |
| app | |
| kafka | |
| up-flags: '--build' | |
| down-flags: '--volumes' | |
| - name: Wait for containers to initialize | |
| run: sleep 10 | |
| - name: Check container health | |
| run: | | |
| echo "Verificando saúde dos containers..." | |
| APP_STATUS=$(docker inspect -f '{{.State.Running}}' app || echo "false") | |
| KAFKA_STATUS=$(docker inspect -f '{{.State.Running}}' kafka || echo "false") | |
| echo "Status do app: $APP_STATUS" | |
| echo "Status do kafka: $KAFKA_STATUS" | |
| if [ "$APP_STATUS" != "true" ] || [ "$KAFKA_STATUS" != "true" ]; then | |
| echo "::error ::Um ou ambos os containers estão inativos. PR não deve ser autorizado!" | |
| exit 1 | |
| fi | |
| # Se chegou aqui, ambos estão ativos | |
| - name: Success message | |
| run: echo "✅ Todos os containers estão rodando com sucesso!" |