Skip to content

Add codecov

Add codecov #7

Workflow file for this run

name: "CodeCov"
# Can be tested locally with https://github.com/nektos/act
# Use version 0.2.51
# act -P ubuntu-latest=quay.io/jamezp/act-maven (to use docker image with maven)
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
paths-ignore:
- '**/*.md'
- '**/*.txt'
schedule:
- cron: "21 11 * * 0"
jobs:
codecov:
name: CodeCov
runs-on: ubuntu-latest
services:
minio:
image: minio/minio
ports:
- 10000:10000
env:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "true"
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 18
cache: 'maven'
- name: Run tests and collect coverage
run: mvn clean install
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
#TODO: add caching