Merge pull request #405 from mybatis/renovate/shogo82148-actions-setu… #912
This file contains hidden or 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: Coveralls | |
| on: [push, pull_request] | |
| permissions: read-all | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| coveralls: | |
| if: github.repository_owner == 'mybatis' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Setup Java | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| with: | |
| cache: maven | |
| distribution: temurin | |
| java-version: 25 | |
| - name: Start Redis | |
| uses: shogo82148/actions-setup-redis@cffee944ffbd5abbbcdcae8f29dee5f22a8ca1f7 # v1.57.0 | |
| with: | |
| redis-version: latest | |
| - name: Run the build | |
| run: ./mvnw test --batch-mode --no-transfer-progress --quiet --show-version -Dlicense.skip=true | |
| - name: Report Coverage to Coveralls for Pull Requests | |
| if: github.event_name == 'pull_request' | |
| run: ./mvnw generate-sources jacoco:report coveralls:report --batch-mode --no-transfer-progress -DpullRequest=${{ env.PR_NUMBER }} -DrepoToken=${{ env.GITHUB_TOKEN }} -DserviceName=github | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.number }} | |
| - name: Report Coverage to Coveralls for General Push | |
| if: github.event_name == 'push' | |
| run: ./mvnw generate-sources jacoco:report coveralls:report --batch-mode --no-transfer-progress -DrepoToken=${{ env.GITHUB_TOKEN }} -DserviceName=github | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |