Repository navigation
chore(deps): bump maven from 3.9.6-eclipse-temurin-17 to 3.9-eclipse-temurin-26 in /backend #203
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: [main, master, development] | |
| paths: | |
| - 'backend/**' | |
| - 'frontend/**' | |
| - '.github/workflows/**' | |
| - 'docker-compose.yml' | |
| - '.editorconfig' | |
| - '.gitattributes' | |
| - '.gitignore' | |
| pull_request: | |
| branches: [main, master, development] | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| name: Detect changed areas | |
| runs-on: ubuntu-latest | |
| outputs: | |
| backend: ${{ steps.filter.outputs.backend }} | |
| frontend: ${{ steps.filter.outputs.frontend }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: filter | |
| uses: dorny/paths-filter@v4 | |
| with: | |
| filters: | | |
| backend: | |
| - 'backend/**' | |
| - '.github/workflows/**' | |
| - 'docker-compose.yml' | |
| frontend: | |
| - 'frontend/**' | |
| - '.github/workflows/**' | |
| backend: | |
| name: Backend - test and package | |
| needs: changes | |
| if: needs.changes.outputs.backend == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| cache: maven | |
| - name: Test, package and measure coverage | |
| working-directory: backend | |
| run: ./mvnw -B -ntp verify | |
| - name: Upload test reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: surefire-reports | |
| path: backend/target/surefire-reports/ | |
| retention-days: 7 | |
| - name: Upload coverage report | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jacoco-report | |
| path: backend/target/site/jacoco/ | |
| retention-days: 14 | |
| frontend: | |
| name: Frontend - lint and build | |
| needs: changes | |
| if: needs.changes.outputs.frontend == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm --prefix frontend ci | |
| - name: Lint | |
| run: npm --prefix frontend run lint | |
| - name: Build | |
| run: npm --prefix frontend run build | |
| docker: | |
| name: Docker images build | |
| needs: changes | |
| if: needs.changes.outputs.backend == 'true' || needs.changes.outputs.frontend == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Build backend image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./backend | |
| push: false | |
| cache-from: type=gha,scope=backend | |
| cache-to: type=gha,mode=max,scope=backend | |
| - name: Build frontend image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./frontend | |
| push: false | |
| cache-from: type=gha,scope=frontend | |
| cache-to: type=gha,mode=max,scope=frontend |