Bump codecov/codecov-action in the github-actions group (#97) #61
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: Build | |
on: | |
push: | |
branches: | |
- master | |
- "1.6" | |
paths-ignore: | |
- "README.md" | |
- "release-notes/*" | |
pull_request: | |
branches: | |
- master | |
- "1.6" | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Alas, JDK14 can't be yet used while build is for Java 6 | |
java_version: ['8', '11', '17'] | |
os: ['ubuntu-20.04'] | |
env: | |
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1" | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up JDK | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 | |
with: | |
distribution: "temurin" | |
java-version: ${{ matrix.java_version }} | |
cache: 'maven' | |
- name: Build | |
run: ./mvnw -B -ff -ntp clean verify | |
- name: Generate code coverage | |
if: github.event_name != 'pull_request' && matrix.java_version == '8' | |
run: ./mvnw -B -q -ff -ntp test | |
- name: Publish code coverage | |
if: github.event_name != 'pull_request' && matrix.java_version == '8' | |
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./target/site/jacoco/jacoco.xml | |
flags: unittests |