Skip to content

weekly-code-coverage #154

weekly-code-coverage

weekly-code-coverage #154

name: weekly-code-coverage
on:
workflow_dispatch:
schedule:
- cron: '30 3 * * 0' # Sun 3:30 UTC
pull_request:
paths:
- '.github/workflows/code-coverage.yaml' # so that it also runs on PRs that change this file
jobs:
code-coverage:
name: create and publish coverage report
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v5
with:
java-version: 25
distribution: 'zulu'
cache: 'maven'
# Run unit and integration tests with jacoco profile
- name: Create coverage report
run: mvn install -P jacoco --batch-mode -Dmaven.test.redirectTestOutputToFile -Dmatsim.preferLocalDtds=true
- name: Push code coverage to CodeCov
uses: codecov/codecov-action@v6
with:
files: ./matsim/target/site/jacoco/jacoco.xml,contribs/*/target/site/jacoco/jacoco.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
env:
MAVEN_OPTS: -Xmx2g