Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[infra] Update to develocity API #5967

Merged
merged 5 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ on:
workflow_dispatch:

env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
benchmarks:
runs-on: macos-14
if: github.repository == 'apollographql/apollo-kotlin'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 #v4.0.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/gradle-build-action@42452daeb5b454a76f686a8e4de8234afd7b1f44 #v2.12.0
- uses: gradle/gradle-build-action@db35f2304698ac6ff98958322dfd3db0a5da9fdf #v3.4.0
with:
gradle-home-cache-cleanup: true
- run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/defer-with-router-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
schedule:
- cron: '0 3 * * *'
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
defer-with-router-tests:
runs-on: ubuntu-latest
if: github.repository == 'apollographql/apollo-kotlin'
steps:
- name: Checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7

- name: Install and run subgraph
working-directory: tests/defer/router/subgraphs/computers
Expand All @@ -29,13 +29,13 @@ jobs:
./router --supergraph tests/defer/router/simple-supergraph.graphqls &

- name: Setup Java
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 #v4.0.0
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@42452daeb5b454a76f686a8e4de8234afd7b1f44 #v2.12.0
uses: gradle/gradle-build-action@db35f2304698ac6ff98958322dfd3db0a5da9fdf #v3.4.0

- name: Run Apollo Kotlin @defer tests
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/platform-api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ on:
workflow_dispatch:

env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
platform-api-tests:
runs-on: macos-14
if: github.repository == 'apollographql/apollo-kotlin'
steps:
- name: Checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7

- name: Setup Java
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 #v4.0.0
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@42452daeb5b454a76f686a8e4de8234afd7b1f44 #v2.12.0
uses: gradle/gradle-build-action@db35f2304698ac6ff98958322dfd3db0a5da9fdf #v3.4.0

- name: Run tests against the Apollo Platform API
env:
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'docs/**'
- '*.md'
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

# Cancel any current or previous job from the same PR
concurrency:
Expand All @@ -18,21 +18,21 @@ jobs:
if: "!startsWith(github.head_ref, 'release-')"
runs-on: macos-14
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 #v4.0.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/gradle-build-action@42452daeb5b454a76f686a8e4de8234afd7b1f44 #v2.12.0
- uses: gradle/gradle-build-action@db35f2304698ac6ff98958322dfd3db0a5da9fdf #v3.4.0
with:
gradle-home-cache-cleanup: true
- name: Build with Gradle
run: |
./gradlew ciTestsGradle
./gradlew ciTestsGradle -Ddevelocity.deprecation.captureOrigin=true
- name: Collect Diagnostics
if: always()
run: ./scripts/collect-diagnostics.main.kts
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
if: always()
with:
name: tests-gradle.zip
Expand All @@ -42,12 +42,12 @@ jobs:
if: "!startsWith(github.head_ref, 'release-')"
runs-on: macos-14
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 #v4.0.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/gradle-build-action@42452daeb5b454a76f686a8e4de8234afd7b1f44 #v2.12.0
- uses: gradle/gradle-build-action@db35f2304698ac6ff98958322dfd3db0a5da9fdf #v3.4.0
with:
gradle-home-cache-cleanup: true
- name: Build with Gradle
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Collect Diagnostics
if: always()
run: ./scripts/collect-diagnostics.main.kts
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
if: always()
with:
name: tests-no-gradle.zip
Expand All @@ -66,12 +66,12 @@ jobs:
if: "!startsWith(github.head_ref, 'release-')"
runs-on: macos-14
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 #v4.0.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/gradle-build-action@42452daeb5b454a76f686a8e4de8234afd7b1f44 #v2.12.0
- uses: gradle/gradle-build-action@db35f2304698ac6ff98958322dfd3db0a5da9fdf #v3.4.0
with:
gradle-home-cache-cleanup: true
- name: Build with Gradle
Expand All @@ -80,7 +80,7 @@ jobs:
- name: Collect Diagnostics
if: always()
run: ./scripts/collect-diagnostics.main.kts
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
if: always()
with:
name: tests-integration.zip
Expand All @@ -102,11 +102,11 @@ jobs:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7

# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 #v4.0.0
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
Expand Down Expand Up @@ -136,14 +136,14 @@ jobs:
# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
with:
name: tests-result
path: ${{ github.workspace }}/intellij-plugin/build/reports/tests

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 #v4.0.0
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
with:
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('intellij-plugin/build/listProductsReleases.txt') }}
Expand All @@ -155,7 +155,7 @@ jobs:
# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/intellij-plugin/build/reports/pluginVerifier
Expand All @@ -173,7 +173,7 @@ jobs:

# Store already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./intellij-plugin/build/distributions/content/*/*
6 changes: 3 additions & 3 deletions .github/workflows/publish-ij-plugin-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ on:
- cron: '0 0 * * 0'
workflow_dispatch:
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
publish-intellij-plugin:
name: Publish IntelliJ plugin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7

- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 #v4.0.0
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ on:
- 'docs/**'
- '*.md'
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
deploy:
runs-on: macos-14
if: github.repository == 'apollographql/apollo-kotlin'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 #v4.0.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/gradle-build-action@42452daeb5b454a76f686a8e4de8234afd7b1f44 #v2.12.0
- uses: gradle/gradle-build-action@db35f2304698ac6ff98958322dfd3db0a5da9fdf #v3.4.0
with:
gradle-home-cache-cleanup: true
- name: Build with Gradle
Expand All @@ -35,13 +35,13 @@ jobs:
- name: Collect Diagnostics
if: always()
run: ./scripts/collect-diagnostics.main.kts
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
if: always()
with:
name: push.zip
path: diagnostics.zip
- name: Deploy Kdoc to github pages
uses: JamesIves/github-pages-deploy-action@65b5dfd4f5bcd3a7403bbc2959c144256167464e #v4.5.0
uses: JamesIves/github-pages-deploy-action@5c6e9e9f3672ce8fd37b9856193d2a537941e66c #v4.6.1
with:
branch: gh-pages # The branch the action should deploy to.
folder: libraries/apollo-kdoc/build/dokka/html # The folder the action should deploy.
12 changes: 6 additions & 6 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ on:
tags:
- '*'
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
publish-libraries:
name: Publish libraries
runs-on: macos-14
if: github.repository == 'apollographql/apollo-kotlin'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 #v4.0.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/gradle-build-action@42452daeb5b454a76f686a8e4de8234afd7b1f44 #v2.12.0
- uses: gradle/gradle-build-action@db35f2304698ac6ff98958322dfd3db0a5da9fdf #v3.4.0
with:
gradle-home-cache-cleanup: true
#--no-configuration-cache for https://youtrack.jetbrains.com/issue/KT-65879
Expand All @@ -36,8 +36,8 @@ jobs:
name: Publish IntelliJ plugin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 #v4.0.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'temurin'
java-version: 17
Expand Down
7 changes: 4 additions & 3 deletions build-logic/src/main/kotlin/Testing.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.gradle.enterprise.gradleplugin.testretry.retry
import com.gradle.develocity.agent.gradle.test.DevelocityTestConfiguration
import org.gradle.api.Project
import org.gradle.api.tasks.PathSensitivity
import org.gradle.api.tasks.testing.AbstractTestTask
Expand All @@ -14,10 +14,10 @@ fun Project.configureTesting() {
forwardEnv("testFilter")
forwardEnv("codegenModels")
}

pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
tasks.withType(Test::class.java) {
retry {
extensions.getByType(DevelocityTestConfiguration::class.java).testRetry {
if (isCIBuild()) {
maxRetries.set(3)
failOnPassedAfterRetry.set(true)
Expand Down Expand Up @@ -54,6 +54,7 @@ private fun Project.addTestDependencies() {
}
}
}

is KotlinJvmProjectExtension -> {
dependencies.add("testImplementation", getCatalogLib("kotlin.test"))
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/ge.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ buildCache {
remote(develocity.buildCache) {
enabled = true
// Check access key presence to avoid build cache errors on PR builds when access key is not present
def accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY")
def accessKey = System.getenv("DEVELOCITY_ACCESS_KEY")
push = isCI && accessKey
}
}
Loading