@@ -30,7 +30,7 @@ permissions:
30
30
# ##############
31
31
jobs :
32
32
self-test :
33
- name : GHA Test
33
+ name : Testing
34
34
runs-on : ubuntu-latest
35
35
steps :
36
36
# ###########################
@@ -74,14 +74,16 @@ jobs:
74
74
-c
75
75
echo "Hello, World!" && \
76
76
echo "$TEST_VAR" && \
77
- x=0; while [ $x -le 10 ]; do echo "Sleeping..." && x=$(( $x + 1 )) && sleep 2; done
77
+ x=0; while [ $x -le 10 ]; do echo "Sleeping... $x " && x=$(( $x + 1 )) && sleep 2; done
78
78
override-container-environment : |
79
79
TEST_VAR=foobar123
80
80
81
81
# #####################
82
82
# Test Action itself #
83
83
# #####################
84
84
- name : Test Failure Exit Code
85
+ id : expect-fail
86
+ continue-on-error : true
85
87
uses : ./
86
88
with :
87
89
# Pre created
96
98
subnet-0fef13a6bef01f61a
97
99
subnet-0a676289b4a27a7fa
98
100
99
- tail-logs : false
100
101
override-container : alpine
101
102
override-container-command : |
102
103
/bin/sh
103
104
-c
104
105
exit 1
106
+
107
+ # #########################
108
+ # Check expected failure #
109
+ # #########################
110
+ - name : Check previous for Failure
111
+ if : steps.expect-fail.outcome == 'success'
112
+ run : |
113
+ echo "Expected a failure. Outcome: ${{ steps.expect-fail.outcome }}"
114
+ exit 1
115
+
116
+ # #####################
117
+ # Test Action itself #
118
+ # #####################
119
+ - name : Test Fire and Forget
120
+ uses : ./
121
+ with :
122
+ # Pre created
123
+ cluster : github-gha
124
+ task-definition : arn:aws:ecs:${{ vars.AWS_TESTING_REGION }}:${{ vars.AWS_TESTING_ACCOUNT_ID }}:task-definition/github-gha-alpine
125
+
126
+ assign-public-ip : ' ENABLED'
127
+ security-group-ids : |
128
+ sg-09a0ccb78d5be2a25
129
+ subnet-ids : |
130
+ subnet-08bbfd6c53b0c1049
131
+ subnet-0fef13a6bef01f61a
132
+ subnet-0a676289b4a27a7fa
133
+
134
+ task-wait-until-stopped : false
135
+ override-container : alpine
136
+ override-container-command : |
137
+ /bin/sh
138
+ -c
139
+ x=0; while [ $x -le 10 ]; do echo "Sleeping... $x" && x=$(( $x + 1 )) && sleep 10; done
0 commit comments