fix prod docker #61
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 Pipeline for Spring Boot | |
| on: | |
| push: | |
| branches-ignore: | |
| - staging | |
| - production | |
| - development | |
| pull_request: | |
| branches: | |
| - development | |
| - staging | |
| - production | |
| jobs: | |
| unit-tests: | |
| name: 🧪 Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven | |
| - name: Run unit tests | |
| run: mvn test -Punit-tests | |
| integration-tests: | |
| name: 🔗 Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven | |
| - name: Run integration tests | |
| run: mvn test -Pintegration-tests | |
| e2e-tests: | |
| name: 🚀 E2E Tests | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' && ((github.base_ref == 'staging' && github.head_ref == 'development') || (github.base_ref == 'production' && github.head_ref == 'staging')) | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Run E2E tests | |
| run: mvn test -Pe2e-tests |