Skip to content

Commit 3588cae

Browse files
committed
Merge branch 'main' into leocolman/tests
2 parents aea3645 + 4f56e2c commit 3588cae

File tree

55 files changed

+1514
-467
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1514
-467
lines changed

.github/workflows/_shared.main.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env kotlin
2-
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.6.0")
2+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.7.0")
33

44
import io.github.typesafegithub.workflows.dsl.expressions.expr
55

.github/workflows/bindings-server.main.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env kotlin
22
@file:Repository("https://repo.maven.apache.org/maven2/")
3-
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.6.0")
3+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.7.0")
44

55
@file:Repository("https://bindings.krzeminski.it")
6-
@file:DependsOn("actions:checkout:v5")
6+
@file:DependsOn("actions:checkout:v6")
77
@file:DependsOn("gradle:actions__setup-gradle:v5")
88
@file:DependsOn("fwilhe2:setup-kotlin:v1")
99

@@ -19,6 +19,7 @@ import io.github.typesafegithub.workflows.dsl.JobBuilder
1919
import io.github.typesafegithub.workflows.dsl.expressions.Contexts
2020
import io.github.typesafegithub.workflows.dsl.expressions.expr
2121
import io.github.typesafegithub.workflows.dsl.workflow
22+
import io.github.typesafegithub.workflows.yaml.CheckoutActionVersionSource
2223
import io.github.typesafegithub.workflows.yaml.DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG
2324
import java.net.URI
2425
import java.net.ConnectException
@@ -43,6 +44,7 @@ workflow(
4344
),
4445
consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
4546
useLocalBindingsServerAsFallback = true,
47+
checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(),
4648
),
4749
sourceFile = __FILE__,
4850
) {

.github/workflows/bindings-server.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- id: 'step-0'
2020
name: 'Check out'
21-
uses: 'actions/checkout@v4'
21+
uses: 'actions/checkout@v6'
2222
- id: 'step-1'
2323
name: 'Execute script'
2424
continue-on-error: true
@@ -53,7 +53,7 @@ jobs:
5353
APP_CLIENT_ID: 'Iv23liIZ17VJKUpjacBs'
5454
steps:
5555
- id: 'step-0'
56-
uses: 'actions/checkout@v5'
56+
uses: 'actions/checkout@v6'
5757
- id: 'step-1'
5858
uses: 'gradle/actions/setup-gradle@v5'
5959
- id: 'step-2'
@@ -136,7 +136,7 @@ jobs:
136136
name: 'DockerHub'
137137
steps:
138138
- id: 'step-0'
139-
uses: 'actions/checkout@v5'
139+
uses: 'actions/checkout@v6'
140140
- id: 'step-1'
141141
uses: 'gradle/actions/setup-gradle@v5'
142142
- id: 'step-2'

.github/workflows/build.main.kts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env kotlin
22
@file:Repository("https://repo.maven.apache.org/maven2/")
3-
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.6.0")
3+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.7.0")
44

55
@file:Repository("https://bindings.krzeminski.it")
6-
@file:DependsOn("actions:cache:v4")
7-
@file:DependsOn("actions:checkout:v5")
6+
@file:DependsOn("actions:cache:v5")
7+
@file:DependsOn("actions:checkout:v6")
88
@file:DependsOn("actions:setup-java:v5")
99
@file:DependsOn("gradle:actions__setup-gradle:v5")
1010

@@ -22,6 +22,7 @@ import io.github.typesafegithub.workflows.domain.triggers.Push
2222
import io.github.typesafegithub.workflows.dsl.expressions.Contexts
2323
import io.github.typesafegithub.workflows.dsl.expressions.expr
2424
import io.github.typesafegithub.workflows.dsl.workflow
25+
import io.github.typesafegithub.workflows.yaml.CheckoutActionVersionSource
2526
import io.github.typesafegithub.workflows.yaml.DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG
2627

2728
val GRADLE_ENCRYPTION_KEY by Contexts.secrets
@@ -34,6 +35,7 @@ workflow(
3435
),
3536
consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
3637
useLocalBindingsServerAsFallback = true,
38+
checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(),
3739
),
3840
sourceFile = __FILE__,
3941
) {

.github/workflows/build.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- id: 'step-0'
1717
name: 'Check out'
18-
uses: 'actions/checkout@v4'
18+
uses: 'actions/checkout@v6'
1919
- id: 'step-1'
2020
name: 'Execute script'
2121
continue-on-error: true
@@ -45,9 +45,9 @@ jobs:
4545
- 'check_yaml_consistency'
4646
steps:
4747
- id: 'step-0'
48-
uses: 'actions/checkout@v5'
48+
uses: 'actions/checkout@v6'
4949
- id: 'step-1'
50-
uses: 'actions/cache@v4'
50+
uses: 'actions/cache@v5'
5151
with:
5252
path: 'buildSrc/build'
5353
key: 'gradle-buildSrc-build-dir-${{ runner.os }}'
@@ -73,9 +73,9 @@ jobs:
7373
- 'check_yaml_consistency'
7474
steps:
7575
- id: 'step-0'
76-
uses: 'actions/checkout@v5'
76+
uses: 'actions/checkout@v6'
7777
- id: 'step-1'
78-
uses: 'actions/cache@v4'
78+
uses: 'actions/cache@v5'
7979
with:
8080
path: 'buildSrc/build'
8181
key: 'gradle-buildSrc-build-dir-${{ runner.os }}'
@@ -106,7 +106,7 @@ jobs:
106106
if: '${{ github.ref == ''refs/heads/main'' }}'
107107
steps:
108108
- id: 'step-0'
109-
uses: 'actions/checkout@v5'
109+
uses: 'actions/checkout@v6'
110110
- id: 'step-1'
111111
name: 'Set up JDK'
112112
uses: 'actions/setup-java@v5'
@@ -142,7 +142,7 @@ jobs:
142142
- 'check_yaml_consistency'
143143
steps:
144144
- id: 'step-0'
145-
uses: 'actions/checkout@v5'
145+
uses: 'actions/checkout@v6'
146146
- id: 'step-1'
147147
uses: 'actions/setup-python@v6'
148148
with:
@@ -158,7 +158,7 @@ jobs:
158158
- 'check_yaml_consistency'
159159
steps:
160160
- id: 'step-0'
161-
uses: 'actions/checkout@v5'
161+
uses: 'actions/checkout@v6'
162162
- id: 'step-1'
163163
run: |-
164164
find -name *.main.kts -print0 | while read -d $'\0' file
@@ -179,7 +179,7 @@ jobs:
179179
- 'check_yaml_consistency'
180180
steps:
181181
- id: 'step-0'
182-
uses: 'actions/checkout@v5'
182+
uses: 'actions/checkout@v6'
183183
- id: 'step-1'
184184
name: 'Set up JDK'
185185
uses: 'actions/setup-java@v5'

.github/workflows/end-to-end-tests-2nd-workflow.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- id: 'step-0'
1717
name: 'Check out'
18-
uses: 'actions/checkout@v4'
18+
uses: 'actions/checkout@v6'
1919
- id: 'step-1'
2020
name: 'Set up JDK'
2121
uses: 'actions/setup-java@v5'
@@ -30,8 +30,25 @@ jobs:
3030
run: './gradlew publishToMavenLocal'
3131
- id: 'step-4'
3232
name: 'Execute script'
33+
continue-on-error: true
3334
run: 'rm ''.github/workflows/end-to-end-tests-2nd-workflow.yaml'' && ''.github/workflows/end-to-end-tests.main.kts'''
3435
- id: 'step-5'
36+
name: '[Fallback] Start the local server'
37+
run: 'docker run -p 8080:8080 krzema12/github-workflows-kt-jit-binding-server &'
38+
if: '${{ steps.step-4.outcome != ''success'' }}'
39+
- id: 'step-6'
40+
name: '[Fallback] Wait for the server'
41+
run: 'curl --head -X GET --retry 60 --retry-all-errors --retry-delay 1 http://localhost:8080/status'
42+
if: '${{ steps.step-4.outcome != ''success'' }}'
43+
- id: 'step-7'
44+
name: '[Fallback] Replace server URL in script'
45+
run: 'sed -i -e ''s/https:\/\/bindings.krzeminski.it/http:\/\/localhost:8080/g'' .github/workflows/end-to-end-tests.main.kts'
46+
if: '${{ steps.step-4.outcome != ''success'' }}'
47+
- id: 'step-8'
48+
name: '[Fallback] Execute script again'
49+
run: 'rm -f ''.github/workflows/end-to-end-tests-2nd-workflow.yaml'' && ''.github/workflows/end-to-end-tests.main.kts'''
50+
if: '${{ steps.step-4.outcome != ''success'' }}'
51+
- id: 'step-9'
3552
name: 'Consistency check'
3653
run: 'git diff --exit-code ''.github/workflows/end-to-end-tests-2nd-workflow.yaml'''
3754
another_job:
@@ -41,7 +58,7 @@ jobs:
4158
steps:
4259
- id: 'step-0'
4360
name: 'Check out'
44-
uses: 'actions/checkout@v5'
61+
uses: 'actions/checkout@v6'
4562
- id: 'step-1'
4663
name: 'Set up JDK'
4764
uses: 'actions/setup-java@v5'

.github/workflows/end-to-end-tests.main.kts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env kotlin
22
@file:Repository("file://~/.m2/repository/")
3-
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.6.1-SNAPSHOT")
4-
@file:DependsOn("io.github.typesafegithub:action-updates-checker:3.6.1-SNAPSHOT")
3+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.7.1-SNAPSHOT")
4+
@file:DependsOn("io.github.typesafegithub:action-updates-checker:3.7.1-SNAPSHOT")
55
@file:Repository("https://bindings.krzeminski.it")
6-
@file:DependsOn("actions:checkout:v5")
6+
@file:DependsOn("actions:checkout:v6")
77
@file:DependsOn("actions:github-script:v8")
88
@file:DependsOn("actions:setup-java:v5")
99
@file:DependsOn("actions:setup-python:v6")
@@ -28,6 +28,7 @@ import io.github.typesafegithub.workflows.dsl.JobBuilder
2828
import io.github.typesafegithub.workflows.dsl.expressions.Contexts
2929
import io.github.typesafegithub.workflows.dsl.expressions.expr
3030
import io.github.typesafegithub.workflows.dsl.workflow
31+
import io.github.typesafegithub.workflows.yaml.CheckoutActionVersionSource
3132
import io.github.typesafegithub.workflows.yaml.DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG
3233
import io.github.typesafegithub.workflows.updates.reportAvailableUpdates
3334
import java.time.Instant
@@ -48,9 +49,11 @@ workflow(
4849
PullRequest(),
4950
),
5051
consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
52+
useLocalBindingsServerAsFallback = true,
5153
env = mapOf(
5254
"GITHUB_TOKEN" to expr("secrets.GITHUB_TOKEN")
5355
),
56+
checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(),
5457
additionalSteps = {
5558
publishToMavenLocal()
5659
},
@@ -102,7 +105,7 @@ workflow(
102105
action = CustomAction(
103106
actionOwner = "actions",
104107
actionName = "checkout",
105-
actionVersion = "v5",
108+
actionVersion = "v6",
106109
),
107110
)
108111

@@ -129,7 +132,7 @@ workflow(
129132
action = object : RegularAction<Action.Outputs>(
130133
actionOwner = "actions",
131134
actionName = "checkout",
132-
actionVersion = "v5",
135+
actionVersion = "v6",
133136
) {
134137
override fun toYamlArguments() =
135138
linkedMapOf(
@@ -290,6 +293,8 @@ workflow(
290293
PullRequest(),
291294
),
292295
consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
296+
useLocalBindingsServerAsFallback = true,
297+
checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(),
293298
additionalSteps = {
294299
publishToMavenLocal()
295300
},

.github/workflows/end-to-end-tests.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- id: 'step-0'
1919
name: 'Check out'
20-
uses: 'actions/checkout@v4'
20+
uses: 'actions/checkout@v6'
2121
- id: 'step-1'
2222
name: 'Set up JDK'
2323
uses: 'actions/setup-java@v5'
@@ -32,8 +32,25 @@ jobs:
3232
run: './gradlew publishToMavenLocal'
3333
- id: 'step-4'
3434
name: 'Execute script'
35+
continue-on-error: true
3536
run: 'rm ''.github/workflows/end-to-end-tests.yaml'' && ''.github/workflows/end-to-end-tests.main.kts'''
3637
- id: 'step-5'
38+
name: '[Fallback] Start the local server'
39+
run: 'docker run -p 8080:8080 krzema12/github-workflows-kt-jit-binding-server &'
40+
if: '${{ steps.step-4.outcome != ''success'' }}'
41+
- id: 'step-6'
42+
name: '[Fallback] Wait for the server'
43+
run: 'curl --head -X GET --retry 60 --retry-all-errors --retry-delay 1 http://localhost:8080/status'
44+
if: '${{ steps.step-4.outcome != ''success'' }}'
45+
- id: 'step-7'
46+
name: '[Fallback] Replace server URL in script'
47+
run: 'sed -i -e ''s/https:\/\/bindings.krzeminski.it/http:\/\/localhost:8080/g'' .github/workflows/end-to-end-tests.main.kts'
48+
if: '${{ steps.step-4.outcome != ''success'' }}'
49+
- id: 'step-8'
50+
name: '[Fallback] Execute script again'
51+
run: 'rm -f ''.github/workflows/end-to-end-tests.yaml'' && ''.github/workflows/end-to-end-tests.main.kts'''
52+
if: '${{ steps.step-4.outcome != ''success'' }}'
53+
- id: 'step-9'
3754
name: 'Consistency check'
3855
run: 'git diff --exit-code ''.github/workflows/end-to-end-tests.yaml'''
3956
test_job_1:
@@ -63,7 +80,7 @@ jobs:
6380
> result.txt
6481
- id: 'step-2'
6582
name: 'Check out'
66-
uses: 'actions/checkout@v5'
83+
uses: 'actions/checkout@v6'
6784
- id: 'step-3'
6885
name: 'Run local action'
6986
uses: './.github/workflows/test-local-action'
@@ -74,7 +91,7 @@ jobs:
7491
uses: 'docker://alpine:latest'
7592
- id: 'step-5'
7693
name: 'Check out again'
77-
uses: 'actions/checkout@v5'
94+
uses: 'actions/checkout@v6'
7895
with:
7996
repository: 'actions/checkout'
8097
ref: 'v3'
@@ -92,7 +109,7 @@ jobs:
92109
uses: 'actions/setup-python@v6'
93110
- id: 'step-9'
94111
name: 'Some step consuming other step''s output'
95-
uses: 'actions/checkout@v5'
112+
uses: 'actions/checkout@v6'
96113
with:
97114
ssh-key: '${{ steps.step-8.outputs.python-version }}'
98115
path: '${{ steps.step-8.outputs.my-unsafe-output }}'

.github/workflows/release.main.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env kotlin
22
@file:Repository("https://repo.maven.apache.org/maven2/")
3-
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.6.0")
3+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.7.0")
44

55
@file:Repository("https://bindings.krzeminski.it")
6-
@file:DependsOn("actions:checkout:v5")
6+
@file:DependsOn("actions:checkout:v6")
77
@file:DependsOn("gradle:actions__setup-gradle:v5")
88
@file:DependsOn("JamesIves:github-pages-deploy-action:v4")
99

@@ -19,13 +19,15 @@ import io.github.typesafegithub.workflows.domain.triggers.Push
1919
import io.github.typesafegithub.workflows.dsl.JobBuilder
2020
import io.github.typesafegithub.workflows.dsl.expressions.expr
2121
import io.github.typesafegithub.workflows.dsl.workflow
22+
import io.github.typesafegithub.workflows.yaml.CheckoutActionVersionSource
2223
import io.github.typesafegithub.workflows.yaml.DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG
2324

2425
workflow(
2526
name = "Release",
2627
on = listOf(Push(tags = listOf("v*.*.*"))),
2728
consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
2829
useLocalBindingsServerAsFallback = true,
30+
checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(),
2931
),
3032
sourceFile = __FILE__,
3133
env = mapOf(

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- id: 'step-0'
2121
name: 'Check out'
22-
uses: 'actions/checkout@v4'
22+
uses: 'actions/checkout@v6'
2323
- id: 'step-1'
2424
name: 'Execute script'
2525
continue-on-error: true
@@ -49,7 +49,7 @@ jobs:
4949
- 'check_yaml_consistency'
5050
steps:
5151
- id: 'step-0'
52-
uses: 'actions/checkout@v5'
52+
uses: 'actions/checkout@v6'
5353
- id: 'step-1'
5454
name: 'Set up JDK'
5555
uses: 'actions/setup-java@v5'

0 commit comments

Comments
 (0)