Skip to content

Sarthak | Adds CodeCov in build.yml #34

Sarthak | Adds CodeCov in build.yml

Sarthak | Adds CodeCov in build.yml #34

Workflow file for this run

name: TaskListRefactoring
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload Report
uses: 'actions/upload-artifact@v3'
with:
name: jacoco-report
path: |
${{ github.workspace }}/target/site/jacoco/jacoco.xml
${{ github.workspace }}/target/site/jacoco/index.html
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}