Feature/ei 315 #1017
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: Codecov Backend | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'dependabot/**' | |
| - 'renovate/**' | |
| paths: | |
| - 'endpoint-insights-api/**' | |
| - '.github/workflows/codecov-backend.yaml' | |
| pull_request: | |
| paths: | |
| - 'endpoint-insights-api/**' | |
| - '.github/workflows/codecov-backend.yaml' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: endpoint-insights-api | |
| steps: | |
| - name: 'Harden Runner' | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | |
| with: | |
| distribution: temurin | |
| java-version: 25 | |
| - name: Cache Maven packages | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Install dependencies | |
| run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | |
| - name: Run tests and collect coverage | |
| run: mvn -B test jacoco:report | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| file: ./endpoint-insights-api/target/site/jacoco/jacoco.xml | |
| flags: backend | |
| name: codecov-backend | |
| fail_ci_if_error: true |