Add test coverage #26
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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build with Maven | |
run: mvn clean install -e | |
- name: Archive test reports | |
uses: actions/upload-artifact@v3 | |
with: | |
name: surefire-reports | |
path: target/surefire-reports | |
- name: Run tests and generate code coverage report | |
run: mvn test | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: target/site/jacoco/jacoco.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Report Coverage | |
run: curl -s https://codecov.io/bash | bash |