1# Licensed to the Apache Software Foundation (ASF) under one or more 2# contributor license agreements. See the NOTICE file distributed with 3# this work for additional information regarding copyright ownership. 4# The ASF licenses this file to You under the Apache License, Version 2.0 5# (the "License"); you may not use this file except in compliance with 6# the License. You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16name: Coverage 17 18on: [push, pull_request] 19 20permissions: 21 contents: read 22 23jobs: 24 build: 25 26 runs-on: ubuntu-latest 27 strategy: 28 matrix: 29 java: [ 8 ] 30 31 steps: 32 - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 33 with: 34 persist-credentials: false 35 - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 36 with: 37 path: ~/.m2/repository 38 key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} 39 restore-keys: | 40 ${{ runner.os }}-maven- 41 - name: Set up JDK ${{ matrix.java }} 42 uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 43 with: 44 distribution: 'temurin' 45 java-version: ${{ matrix.java }} 46 - name: Build with Maven 47 run: mvn --show-version --batch-mode --no-transfer-progress test jacoco:report 48 49 - name: Upload coverage to Codecov 50 uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 51 with: 52 files: ./target/site/jacoco/jacoco.xml 53