-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.52 KB
/
efileproxy_monitor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: EfileProxy monitoring
on:
workflow_dispatch:
schedule:
# run once a day
# * is a special character in YAML, so you have to quote the string
- cron: "0 8,16 * * *"
jobs:
prod-testing:
runs-on: ubuntu-latest
name: Check efile prod
steps:
- run: |
import requests
import json
with requests.get("https://efile.suffolklitlab.org/about") as conn:
if conn.ok:
j_about = json.loads(conn.text)
else:
print(f"Couldnt't connect to efile prod! {conn.status_code}")
exit(1)
if 'version' not in j_about:
print(f"Couldn't get version from the about page of efile prod?: {j_about}")
exit(2)
print(f"EfileProxy Monitoring all good; able to connect to prod's about page")
shell: python
test-testing:
runs-on: ubuntu-latest
name: Check efile test
steps:
- run: |
import requests
import json
with requests.get("https://efile-test.suffolklitlab.org/about") as conn:
if conn.ok:
j_about = json.loads(conn.text)
else:
print(f"Couldnt't connect to efile test! {conn.status_code}")
exit(1)
if 'version' not in j_about:
print(f"Couldn't get version from the about page of efile test?: {j_about}")
exit(2)
print(f"EfileProxy Monitoring all good; able to connect to test's about page")
shell: python