Merge pull request #102 from JobDri-Developer/revert-101-feat/#38-moc… #150
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: | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| cache: gradle | |
| - name: Grant Gradle permission | |
| run: chmod +x ./gradlew | |
| - name: Run tests | |
| run: ./gradlew --no-daemon clean test | |
| docker-build: | |
| name: Docker Build | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| cache: gradle | |
| - name: Grant Gradle permission | |
| run: chmod +x ./gradlew | |
| - name: Build application jar | |
| run: ./gradlew --no-daemon clean bootJar -x test | |
| - name: Build Docker image | |
| run: docker build -t jobdri-api:${{ github.sha }} . |