Generate and archive a Jacoco code coverage report #1414
This file contains 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
# This workflow will generate a code coverage report | |
name: Generate and archive a Jacoco code coverage report | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '30 18 * * *' # 00:00 in LK time (GMT+5:30) | |
workflow_dispatch: | |
jobs: | |
ubuntu-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Build with Gradle | |
env: | |
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} | |
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} | |
working-directory: ./coverage-reports | |
run: ./gradlew codeCoverageReport --stacktrace -scan --console=plain --no-daemon | |
- name: Archive Code Coverage Zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CoverageReport | |
path: coverage-reports/build/reports/jacoco/codeCoverageReport |