Skip to content

Commit

Permalink
feat(library): add prefixes to step names for fallback path
Browse files Browse the repository at this point in the history
Part of #1765.
  • Loading branch information
krzema12 committed Jan 13, 2025
1 parent 984db40 commit df2da76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,26 @@ internal fun WorkflowBuilder.consistencyCheckJob(
)
val ifFirstCompilationFails = expr { firstCompilationStep.outcome.neq(Status.Success) }
run(
name = "Start the local server",
name = "[Fallback] Start the local server",
command = "docker run -p 8080:8080 krzema12/github-workflows-kt-jit-binding-server &",
condition = ifFirstCompilationFails,
)
run(
name = "Wait for the server",
name = "[Fallback] Wait for the server",
command =
"curl --head -X GET --retry 60 --retry-all-errors --retry-delay 1 " +
"http://localhost:8080/status",
condition = ifFirstCompilationFails,
)
run(
name = "Replace server URL in script",
name = "[Fallback] Replace server URL in script",
command =
"sed -i -e 's/https:\\/\\/bindings.krzeminski.it/http:\\/\\/localhost:8080/g' " +
sourceFilePath,
condition = ifFirstCompilationFails,
)
run(
name = "Execute script again",
name = "[Fallback] Execute script again",
command = "rm -f '$targetFilePath' && '$sourceFilePath'",
condition = ifFirstCompilationFails,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,19 +285,19 @@ class IntegrationTest :
continue-on-error: true
run: 'rm ''.github/workflows/some_workflow.yaml'' && ''.github/workflows/some_workflow.main.kts'''
- id: 'step-2'
name: 'Start the local server'
name: '[Fallback] Start the local server'
run: 'docker run -p 8080:8080 krzema12/github-workflows-kt-jit-binding-server &'
if: '${'$'}{{ steps.step-1.outcome != ''success'' }}'
- id: 'step-3'
name: 'Wait for the server'
name: '[Fallback] Wait for the server'
run: 'curl --head -X GET --retry 60 --retry-all-errors --retry-delay 1 http://localhost:8080/status'
if: '${'$'}{{ steps.step-1.outcome != ''success'' }}'
- id: 'step-4'
name: 'Replace server URL in script'
name: '[Fallback] Replace server URL in script'
run: 'sed -i -e ''s/https:\/\/bindings.krzeminski.it/http:\/\/localhost:8080/g'' .github/workflows/some_workflow.main.kts'
if: '${'$'}{{ steps.step-1.outcome != ''success'' }}'
- id: 'step-5'
name: 'Execute script again'
name: '[Fallback] Execute script again'
run: 'rm -f ''.github/workflows/some_workflow.yaml'' && ''.github/workflows/some_workflow.main.kts'''
if: '${'$'}{{ steps.step-1.outcome != ''success'' }}'
- id: 'step-6'
Expand Down

0 comments on commit df2da76

Please sign in to comment.