Skip to content

Commit 1371c5d

Browse files
authored
Merge pull request #3 from iunu/ds/timeout-test
Ds/timeout test
2 parents b75ce6b + b84b3c8 commit 1371c5d

3 files changed

Lines changed: 21 additions & 7 deletions

File tree

.github/workflows/manual_test.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
required: false
2020
shutdown_timeout:
2121
description: "Shutdown grace period (in seconds)."
22-
default: 60
22+
default: 30
2323
required: true
2424
finish_timeout:
2525
description: "Shutdown grace period (in seconds) when manually stopped."
@@ -59,13 +59,25 @@ jobs:
5959
actions_preinstalled: ${{ inputs.actions_preinstalled }}
6060
shutdown_timeout: ${{ inputs.shutdown_timeout }}
6161

62-
test:
62+
test1:
6363
needs: create-runner
6464
runs-on: ${{ needs.create-runner.outputs.label }}
6565
steps:
66-
- run: echo "This runs on the GCE runner VM"
66+
- name: Job 1 Test
67+
run: echo "This runs on the GCE runner VM"
68+
69+
test2:
70+
needs:
71+
- create-runner
72+
- test1
73+
runs-on: ${{ needs.create-runner.outputs.label }}
74+
steps:
75+
- name: Wait for longer than shutdown timeout
76+
run: sleep 60 #Give time for runner to shutdown from shutdown timeout
77+
78+
- name: Job 2 Test
79+
run: echo "This also runs on the GCE runner VM"
6780
- uses: iunu/gce-github-runner@iunu
6881
with:
6982
command: stop
70-
finish_timeout: ${{ inputs.finish_timeout }}
71-
if: always()
83+
if: always()

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ jobs:
3838
run: echo "This runs on the GCE runner VM"
3939

4040
test2:
41-
needs: create-runner
41+
needs:
42+
- create-runner
43+
- test1
4244
runs-on: ${{ needs.create-runner.outputs.label }}
4345
steps:
4446
- name: Wait for longer than shutdown timeout

action.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,4 +374,4 @@ case "$command" in
374374
usage
375375
exit 1
376376
;;
377-
esac
377+
esac

0 commit comments

Comments
 (0)