|
| 1 | +# |
| 2 | +# Copyright 2016-2020 the original author or authors. |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# 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 | + |
| 17 | +name: Coveralls |
| 18 | + |
| 19 | +on: [push, pull_request] |
| 20 | + |
| 21 | +jobs: |
| 22 | + build: |
| 23 | + if: github.repository_owner == 'mybatis' |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v2 |
| 27 | + - name: Set up JDK |
| 28 | + uses: actions/setup-java@v1 |
| 29 | + with: |
| 30 | + java-version: 8 |
| 31 | + - name: Report Coverage to Coveralls for Pull Requests |
| 32 | + if: github.event_name == 'pull_request' |
| 33 | + run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER |
| 34 | + env: |
| 35 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 36 | + PR_NUMBER: ${{ github.event.number }} |
| 37 | + - name: Report Coverage to Coveralls for General Push |
| 38 | + if: github.event_name == 'push' |
| 39 | + run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github |
| 40 | + env: |
| 41 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments