Update plugin testRetry to v1.6.6 #4435
Workflow file for this run
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: Build | |
| on: | |
| push: | |
| branches: master | |
| tags: 'v*' | |
| pull_request: | |
| branches: '**' | |
| jobs: | |
| build: | |
| name: Build on Linux & Deploy | |
| runs-on: ubuntu-latest | |
| env: | |
| TEAMSCALE_PARTITION: 'Coverage' | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-java@v6 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| # Anchored so the Windows job can reuse this step verbatim via *setup-gradle. | |
| - &setup-gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| # "caches" and "notifications" are the action's defaults and have to be repeated here. "wrapper" additionally | |
| # caches the Gradle distributions under wrapper/dists. The teamscale-gradle-plugin tests run against | |
| # MINIMUM_SUPPORTED_VERSION via TestKit, so without this every build re-downloads that distribution | |
| # (~145 MB) from services.gradle.org, which has made builds fail when that server was unavailable. | |
| # The "-all" distribution used by our own wrapper is excluded because it alone would add ~570 MB. | |
| gradle-home-cache-includes: | | |
| caches | |
| notifications | |
| wrapper | |
| gradle-home-cache-excludes: | | |
| wrapper/dists/gradle-*-all | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Upload Release Assets | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ github.ref }} | |
| file: '{agent/build/distributions/teamscale-jacoco-agent.zip,javaws-wrapper/build/distributions/javaws.zip}' | |
| file_glob: true | |
| overwrite: true | |
| - name: Publish to Gradle Plugin Portal | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| ./gradlew publishPlugins \ | |
| -Psigning.secretKeyRingFile=${{ github.workspace }}/.gnupg/secring.gpg \ | |
| -Psigning.password=${{ secrets.MAVEN_CENTRAL_GPG_SIGNATURE }} \ | |
| -Psigning.keyId=4FB80B8E \ | |
| -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} \ | |
| -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} | |
| - name: Publish to Maven Central | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| ./gradlew publishAggregationToCentralPortal \ | |
| -Psigning.secretKeyRingFile=${{ github.workspace }}/.gnupg/secring.gpg \ | |
| -PgpgDirectory=${{ github.workspace }}/.gnupg \ | |
| -Psigning.password=${{ secrets.MAVEN_CENTRAL_GPG_SIGNATURE }} \ | |
| -Psigning.keyId=4FB80B8E \ | |
| -PsonatypeUsername=${{ secrets.SONATYPE_USER }} \ | |
| -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }} | |
| - name: Push Docker Image to DockerHub | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| ./gradlew :agent:pushOciImage --registry=dockerHub :agent:pushLegacyOciImage --registry=dockerHub | |
| ./gradlew :agent:pushOciImage --registry=dockerHub :agent:pushLegacyOciImage --registry=dockerHub -PociImageTag=latest | |
| env: | |
| ORG_GRADLE_PROJECT_dockerHubUsername: ${{ secrets.DOCKERHUB_USER }} | |
| ORG_GRADLE_PROJECT_dockerHubPassword: ${{ secrets.DOCKERHUB_TOKEN }} | |
| # Anchored so the Windows job can reuse this step verbatim via *upload-coverage. | |
| - &upload-coverage | |
| name: Upload coverage to Teamscale | |
| # Fork pull requests get no secrets, and renovate branches are excluded from the Teamscale | |
| # project, so Teamscale can never resolve their commits. github.event.pull_request is null on | |
| # push events, where head.ref therefore reads as the empty string. | |
| if: >- | |
| always() && (github.event_name == 'push' | |
| || github.event.pull_request.head.repo.full_name == github.repository) | |
| && !startsWith(github.event.pull_request.head.ref, 'renovate/') | |
| uses: cqse/teamscale-upload-action@v2.10.0 | |
| with: | |
| server: 'https://cqse.teamscale.io' | |
| project: 'teamscale-jacoco-agent' | |
| user: ${{ secrets.CQSE_TEAMSCALE_IO_USER }} | |
| accesskey: ${{ secrets.CQSE_TEAMSCALE_IO_ACCESSKEY }} | |
| partition: ${{ env.TEAMSCALE_PARTITION }} | |
| format: 'JACOCO' | |
| message: '${{ runner.os }} Coverage' | |
| # On pull_request, actions/checkout checks out the synthetic refs/pull/N/merge commit and | |
| # GitHub sets GITHUB_SHA to it, which is what teamscale-upload's commit auto-detection picks | |
| # up. That commit is not reachable from any branch, so Teamscale never fetches it and cannot | |
| # resolve the revision. Name the pull request's head commit instead. | |
| revision: ${{ github.event.pull_request.head.sha || github.sha }} | |
| files: '**/jacocoTestReport.xml' | |
| test-windows: | |
| name: Test on Windows | |
| runs-on: windows-latest | |
| env: | |
| TEAMSCALE_PARTITION: 'Coverage Windows' | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-java@v6 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - *setup-gradle | |
| - name: Build with Gradle | |
| run: ./gradlew build --max-workers=2 | |
| - *upload-coverage |