docs: architecture flow (domain/usecase/api/kafka), devops pipeline d… #6
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: [develop, main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit-tests: | |
| name: Lint + Unit Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| cache: maven | |
| - name: Check formatting (Spotless) | |
| run: ./mvnw spotless:check | |
| - name: Check style (Checkstyle) | |
| run: ./mvnw checkstyle:check | |
| - name: Run unit tests | |
| run: ./mvnw test | |
| full-verify: | |
| name: Full Verify + Docker Build | |
| # Runs on pushes to main and on PRs targeting main | |
| if: github.ref == 'refs/heads/main' || github.base_ref == 'main' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| cache: maven | |
| - name: Run full verify (unit + integration tests) | |
| run: ./mvnw verify | |
| - name: Build Docker image | |
| run: docker build -t payment-api:ci . |