Skip to content

Commit 16a6c00

Browse files
authored
Simplify our GitHub action files (#6709)
* Cleanup yaml files * Use macos tests * lower deployment target * remove unused tests * lower deployment target for the tests * Fix job name
1 parent 39f0198 commit 16a6c00

File tree

27 files changed

+852
-239
lines changed

27 files changed

+852
-239
lines changed
Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: pr
2-
31
on:
42
pull_request:
53
paths-ignore:
@@ -24,17 +22,8 @@ jobs:
2422
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
2523
with:
2624
gradle-home-cache-cleanup: true
27-
- name: Build with Gradle
28-
run: |
25+
- run: |
2926
./gradlew ciTestsGradle
30-
- name: Collect Diagnostics
31-
if: always()
32-
run: ./scripts/collect-diagnostics.main.kts
33-
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
34-
if: always()
35-
with:
36-
name: tests-gradle.zip
37-
path: diagnostics.zip
3827
3928
tests-no-gradle:
4029
if: "!startsWith(github.head_ref, 'release-')"
@@ -44,17 +33,8 @@ jobs:
4433
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
4534
with:
4635
gradle-home-cache-cleanup: true
47-
- name: Build with Gradle
48-
run: |
36+
- run: |
4937
./gradlew ciTestsNoGradle --stacktrace
50-
- name: Collect Diagnostics
51-
if: always()
52-
run: ./scripts/collect-diagnostics.main.kts
53-
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
54-
if: always()
55-
with:
56-
name: tests-no-gradle.zip
57-
path: diagnostics.zip
5838
5939
tests-integration:
6040
if: "!startsWith(github.head_ref, 'release-')"
@@ -64,21 +44,13 @@ jobs:
6444
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
6545
with:
6646
gradle-home-cache-cleanup: true
67-
- name: Build with Gradle
68-
run: |
47+
- run: |
6948
./gradlew -p tests build
7049
./gradlew -p tests checkGitStatus
71-
- name: Collect Diagnostics
72-
if: always()
73-
run: ./scripts/collect-diagnostics.main.kts
74-
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
75-
if: always()
76-
with:
77-
name: tests-integration.zip
78-
path: diagnostics.zip
7950
80-
ios-tests:
51+
swift-tests:
8152
runs-on: macos-15
8253
steps:
8354
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
84-
- run: /Applications/Xcode_16.2.0.app/Contents/Developer/usr/bin/xcodebuild -allowProvisioningUpdates -project tests/com.apollographql.iostest/com.apollographql.iostest.xcodeproj -configuration Debug -scheme com.apollographql.iostest -sdk iphoneos -destination name='iPhone 16' test -test-timeouts-enabled YES
55+
- run: |
56+
/Applications/Xcode_26.app/Contents/Developer/usr/bin/xcodebuild -allowProvisioningUpdates -project swift-tests/swift-tests.xcodeproj -configuration Debug -scheme swift-tests test -test-timeouts-enabled YES

.github/workflows/bump-kotlin-nightlies.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: Bump kotlin nightlies
2-
31
on:
42
schedule:
53
- cron: '0 2 * * *'
@@ -13,7 +11,6 @@ jobs:
1311
with:
1412
ref: kotlin-nightlies
1513
fetch-depth: 0
16-
- name: Rebase on top of main, bump versions, commit and push, and trigger 'pr' workflow
17-
run: ./scripts/bump-kotlin-nightlies.main.kts
14+
- run: ./scripts/bump-kotlin-nightlies.main.kts
1815
env:
1916
GH_TOKEN: ${{ github.token }}
Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: defer-router-tests
2-
31
on:
42
schedule:
53
- cron: '0 3 * * *'
@@ -11,34 +9,22 @@ jobs:
119
runs-on: ubuntu-latest
1210
if: github.repository == 'apollographql/apollo-kotlin'
1311
steps:
14-
- name: Checkout project
15-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
12+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
1613

17-
- name: Install and run subgraph
18-
working-directory: tests/defer/router/subgraphs/computers
14+
- working-directory: tests/defer/router/subgraphs/computers
1915
run: |
2016
npm install
2117
APOLLO_PORT=4001 npm start &
2218
23-
- name: Install router
24-
run: |
19+
- run: |
2520
curl -sSL https://router.apollo.dev/download/nix/latest | sh
2621
27-
- name: Run router
28-
run: |
22+
- run: |
2923
./router --supergraph tests/defer/router/simple-supergraph.graphqls &
3024
31-
- name: Setup Java
32-
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
33-
with:
34-
distribution: 'temurin'
35-
java-version: 17
36-
37-
- name: Setup Gradle
38-
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
25+
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
3926

40-
- name: Run Apollo Kotlin @defer tests
41-
env:
27+
- env:
4228
DEFER_WITH_ROUTER_TESTS: true
4329
run: |
4430
./gradlew --no-daemon --console plain -p tests :defer:allTests

.github/workflows/issue-close-user-survey.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: Issue Close User Survey
2-
31
on:
42
issues:
53
types: [closed]
Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: platform-api-tests
2-
31
on:
42
# pull_request:
53
# branches: [ '*' ]
@@ -15,20 +13,10 @@ jobs:
1513
runs-on: macos-15
1614
if: github.repository == 'apollographql/apollo-kotlin'
1715
steps:
18-
- name: Checkout project
19-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
20-
21-
- name: Setup Java
22-
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
23-
with:
24-
distribution: 'temurin'
25-
java-version: 17
26-
27-
- name: Setup Gradle
28-
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
16+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
17+
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
2918

30-
- name: Run tests against the Apollo Platform API
31-
env:
19+
- env:
3220
PLATFORM_API_TESTS_KEY: ${{ secrets.PLATFORM_API_TESTS_KEY }}
3321
run: |
3422
./gradlew --no-daemon -p tests :platform-api:platformApiTests

.github/workflows/preview.yml renamed to .github/workflows/publish-preview.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: preview
2-
31
on:
42
workflow_dispatch:
53
inputs:
@@ -15,12 +13,8 @@ on:
1513
jobs:
1614
preview:
1715
runs-on: macos-15
18-
if: github.repository == 'apollographql/apollo-kotlin'
16+
if: github.event.repository.fork == false
1917
steps:
20-
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
21-
with:
22-
distribution: 'temurin'
23-
java-version: 17
2418
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
2519
with:
2620
gradle-home-cache-cleanup: true

.github/workflows/tag.yml renamed to .github/workflows/publish-release.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: tag
2-
31
on:
42
push:
53
tags:
@@ -11,19 +9,13 @@ jobs:
119
publish-libraries:
1210
name: Publish libraries
1311
runs-on: macos-15
14-
if: github.repository == 'apollographql/apollo-kotlin'
12+
if: github.event.repository.fork == false
1513
steps:
1614
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
17-
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
18-
with:
19-
distribution: 'temurin'
20-
java-version: 17
2115
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
2216
with:
2317
gradle-home-cache-cleanup: true
24-
#--no-configuration-cache for https://youtrack.jetbrains.com/issue/KT-65879
25-
- name: Publish to Maven Central
26-
run: |
18+
- run: |
2719
LIBRARIAN_RELEASE=true ./gradlew nmcpPublishAggregationToCentralPortal
2820
env:
2921
LIBRARIAN_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches: [ main ]
4+
paths-ignore:
5+
- 'docs/**'
6+
- '*.md'
7+
env:
8+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
9+
10+
jobs:
11+
deploy:
12+
runs-on: macos-15
13+
if: github.event.repository.fork == false
14+
# Required for the `deploy-pages` action
15+
permissions:
16+
pages: write
17+
id-token: write
18+
steps:
19+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
20+
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
21+
with:
22+
gradle-home-cache-cleanup: true
23+
- run: |
24+
./gradlew :apollo-kdoc:dokkaGeneratePublicationHtml
25+
./gradlew nmcpPublishAggregationToCentralPortalSnapshots
26+
env:
27+
LIBRARIAN_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
28+
LIBRARIAN_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
29+
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa #v3.0.1
30+
with:
31+
path: "libraries/apollo-kdoc/build/dokka/html"
32+
- uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e #v4.0.5

.github/workflows/push.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/benchmarks.yml renamed to .github/workflows/run-benchmarks.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: benchmarks
2-
31
on:
42
# pull_request:
53
# branches: [ '*' ]
@@ -16,26 +14,20 @@ jobs:
1614
if: github.repository == 'apollographql/apollo-kotlin'
1715
steps:
1816
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
19-
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
20-
with:
21-
distribution: 'temurin'
22-
java-version: 17
2317
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
2418
with:
2519
gradle-home-cache-cleanup: true
2620
- run: |
2721
# Build the benchmark apks
2822
./gradlew -p benchmark :app:assembleRelease :microbenchmark:assembleReleaseAndroidTest
2923
# Step can be removed if/when gcloud is added to the macos image - See https://github.com/actions/virtual-environments/issues/4639
30-
- name: Setup gcloud
31-
uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 #v2.1.0
24+
- uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 #v2.1.0
3225
- run: ./scripts/run-benchmarks.main.kts
3326
env:
3427
GOOGLE_SERVICES_JSON: ${{ secrets.APOLLO_KOTLIN_GOOGLE_SERVICES_JSON }}
3528
DD_API_KEY: ${{ secrets.DD_API_KEY }}
3629
GITHUB_TOKEN: ${{ github.token }}
37-
- name: nativebenchmarks
38-
run: |
30+
- run: |
3931
# Run the native benchmarks
4032
./gradlew -p tests :native-benchmarks:allTests
4133
# Upload the results to DataDog

0 commit comments

Comments
 (0)