|
| 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 | + |
| 16 | +name: Coverage |
| 17 | + |
| 18 | +on: [push, pull_request] |
| 19 | + |
| 20 | +permissions: |
| 21 | + contents: read |
| 22 | + |
| 23 | +jobs: |
| 24 | + build: |
| 25 | + |
| 26 | + runs-on: ubuntu-latest |
| 27 | + strategy: |
| 28 | + matrix: |
| 29 | + java: [ 8 ] |
| 30 | + |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v3 |
| 33 | + - uses: actions/cache@v3.0.4 |
| 34 | + with: |
| 35 | + path: ~/.m2/repository |
| 36 | + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 37 | + restore-keys: | |
| 38 | + ${{ runner.os }}-maven- |
| 39 | + - name: Set up JDK ${{ matrix.java }} |
| 40 | + uses: actions/setup-java@v3 |
| 41 | + with: |
| 42 | + distribution: adopt |
| 43 | + java-version: ${{ matrix.java }} |
| 44 | + - name: Build with Maven |
| 45 | + run: mvn -V test jacoco:report --file pom.xml --no-transfer-progress |
| 46 | + |
| 47 | + - name: Upload coverage to Codecov |
| 48 | + uses: codecov/codecov-action@v3 |
| 49 | + with: |
| 50 | + files: ./target/site/jacoco/jacoco.xml |
0 commit comments