feat: Add mentee review api with approve/reject #1053
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: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| backend: ${{ steps.filter.outputs.backend }} | |
| frontend: ${{ steps.filter.outputs.frontend }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: filter | |
| with: | |
| filters: | | |
| backend: | |
| - 'src/**' | |
| - 'build.gradle' | |
| - 'settings.gradle' | |
| - 'gradle/**' | |
| - 'gradlew' | |
| - 'gradlew.bat' | |
| - 'gradle.properties' | |
| frontend: | |
| - 'admin-wcc-app/**' | |
| backend: | |
| needs: changes | |
| if: needs.changes.outputs.backend == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Build and run unit tests | |
| run: ./gradlew test jacocoTestReport | |
| env: | |
| DOCKER_HOST: "unix:///var/run/docker.sock" | |
| TESTCONTAINERS_RYUK_DISABLED: "true" | |
| - name: Run integration tests | |
| run: ./gradlew testIntegration jacocoIntegrationReport | |
| env: | |
| DOCKER_HOST: "unix:///var/run/docker.sock" | |
| TESTCONTAINERS_RYUK_DISABLED: "true" | |
| - name: PMD check | |
| run: ./gradlew pmdAll | |
| - name: JaCoCo coverage verification | |
| run: ./gradlew jacocoTestCoverageVerification | |
| - name: Upload coverage report | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jacoco-report | |
| path: build/reports/jacoco/test/html/ | |
| - name: Print coverage report on failure | |
| if: failure() | |
| run: | | |
| echo "Coverage verification failed. Check the report for details." | |
| cat build/reports/jacoco/test/html/index.html | |
| frontend: | |
| needs: changes | |
| if: needs.changes.outputs.frontend == 'true' | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: admin-wcc-app | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'npm' | |
| cache-dependency-path: admin-wcc-app/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test |