Skip to content

Commit 2fbe37a

Browse files
authored
Merge pull request #18 from devserkan/health-check-tests
Health check tests
2 parents 3a2c551 + ab4f8f3 commit 2fbe37a

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/healthCheck.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Health Check
2+
3+
on:
4+
push
5+
6+
jobs:
7+
healthCheck:
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- name: Check the deployed service URL
11+
uses: jtalk/url-health-check-action@v4
12+
with:
13+
url: https://full-stack-open-pokedex-long-breeze-7978.fly.dev
14+
max-attempts: 3
15+
retry-delay: 5s
16+
- name: Notify Discord on success
17+
if: ${{ success() }}
18+
uses: stegzilla/discord-notify@v2
19+
with:
20+
title: 'Health Check'
21+
message: Pokedex is healthy!
22+
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
23+
username: 'devserkan'
24+
colour: '#1f883d'
25+
- name: Notify Discord on failure
26+
if: ${{ failure() }}
27+
uses: stegzilla/discord-notify@v2
28+
with:
29+
title: 'Health Check'
30+
message: Pokedex is unhealthy!
31+
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
32+
username: 'devserkan'
33+
colour: '#d73a49'

0 commit comments

Comments
 (0)