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@ac593985615ec2ede58e132d2e21d2b1cbd6127c 33 with: 34 persist-credentials: false 35 - uses: actions/cache@v3.2.5 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@v3.10.0 43 with: 44 distribution: 'temurin' 45 java-version: ${{ matrix.java }} 46 - name: Build with Maven 47 run: mvn -V test jacoco:report --file pom.xml --no-transfer-progress 48 49 - name: Upload coverage to Codecov 50 uses: codecov/codecov-action@v3 51 with: 52 files: ./target/site/jacoco/jacoco.xml 53