Skip to content

Commit db39cfc

Browse files
author
Tamas Pallos
committed
Add CI test for healthcheck github action
1 parent c933d1d commit db39cfc

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test healthcheck action
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [main]
7+
8+
jobs:
9+
test-healthcheck-success:
10+
name: Verifies whether healthcheck action succeeds when it should
11+
runs-on: ubuntu-20.04
12+
13+
steps:
14+
- name: Startup sample HTTP server
15+
run: docker run -d -p 8080:80 nginxdemos/hello
16+
17+
- name: Verify that healthcheck succeeds
18+
uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1
19+
with:
20+
retries: 2
21+
command:
22+
"curl --fail http://localhost:8080 --output /dev/null --silent"
23+
24+
# Note: it does not seem to be possible for now to create a CI job for testing a failing
25+
# healthcheck. I have tested it manually however...

0 commit comments

Comments
 (0)