[deps]: Bump org.springframework.cloud:spring-cloud-circuitbreaker-de… #180
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
name: Build project | |
on: [ push ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "corretto" | |
java-version: "17" | |
cache: "gradle" | |
- name: Validate styles | |
uses: pre-commit/[email protected] | |
- name: Build project | |
uses: gradle/gradle-build-action@v3 | |
with: | |
arguments: clean build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jar | |
path: "*-service/build/libs/*.jar" | |
retention-days: 1 | |
test: | |
name: Integration Test | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: jar | |
path: . | |
- name: Build images | |
timeout-minutes: 5 | |
run: docker compose build | |
- name: Run containers | |
id: run-containers | |
timeout-minutes: 10 | |
run: | | |
docker compose up -d --wait | |
env: | |
OAUTH2_SECURITY_ENABLED: true | |
- name: Print logs | |
if: ${{ failure() && steps.run-containers.outcome != 'success' }} | |
run: | | |
docker compose logs | |
- name: Run API Tests | |
uses: matt-ball/newman-action@master | |
with: | |
collection: tests/postman/collection.json | |
environment: tests/postman/local-environment.json | |
delayRequest: 100 | |
reporters: '["cli"]' | |
- name: Stop containers | |
if: ${{ always() }} | |
continue-on-error: true | |
run: docker compose down -v | |
publish: | |
name: Publish to Docker Hub | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: jar | |
path: . | |
- name: Build images | |
timeout-minutes: 5 | |
run: docker compose build | |
- name: Push images | |
run: docker compose push |