Skip to content

Add codecov

Add codecov #9

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: lazybit/minio
ports:
- 10000:10000
env:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
options: --name=minio --health-cmd "curl http://localhost:10000/minio/health/live"
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: Install dependencies
run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- name: Run tests and collect coverage
run: mvn -B test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}