Adopt cross-repo dependency versioning and shared CI #515
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: Codecov | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "*" ] | |
| pull_request: | |
| branches: [ "*" ] | |
| jobs: | |
| upload-coverage-reports: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up JDKs and Gradle | |
| uses: huanshankeji/.github/actions/setup-javas-and-gradle@v0.5.2 | |
| with: | |
| jdk-versions: 11-temurin, 17-temurin | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - name: Test and generate Kover Report with Gradle Wrapper | |
| env: | |
| # GPR_* (PAT, read:packages): resolve Gradle/Maven dev artifacts from another repo's GitHub | |
| # Packages registry. GITHUB_TOKEN is repo-scoped. | |
| # https://github.com/huanshankeji/gradle-common/pull/65 | |
| ORG_GRADLE_PROJECT_gprUser: ${{ secrets.GPR_USER }} | |
| ORG_GRADLE_PROJECT_gprKey: ${{ secrets.GPR_KEY }} | |
| run: ./gradlew test -Pkover koverXmlReport | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| files: ./build/reports/kover/report.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} |