-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (68 loc) · 2.43 KB
/
tests.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: test
run-name: Test Packages
on: push
jobs:
build-packages-workflow:
uses: ./.github/workflows/build.yml
deb-packages:
runs-on: ubuntu-latest
needs: build-packages-workflow
container:
image: debian:latest
options: --cpus 1
steps:
- name: Download Prometheus Artifacts
uses: actions/download-artifact@v3
with:
name: packages
- name: Install curl
run: apt-get update; apt install -y curl
- name: Install DEB packages
run: dpkg -i *.deb
- name: Start Prometheus
run: |
/usr/bin/prometheus --config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/var/lib/prometheus/data \
--web.console.templates=/var/lib/prometheus/consoles \
--web.console.libraries=/var/lib/prometheus/console_libraries \
--web.enable-lifecycle &>/dev/null &
- name: Check Prometheus
run: curl http://localhost:9090/-/healthy
- name: Start node_exporter
run: /usr/bin/node_exporter &>/dev/null &
- name: Check node_exporter
run: curl -I http://localhost:9100/metrics
- name: Start postgres_exporter
run: /usr/bin/postgres_exporter &>/dev/null &
- name: Check postgres_exporter
run: curl -I http://localhost:9187/metrics
rpm-packages:
runs-on: ubuntu-latest
needs: build-packages-workflow
container:
image: rockylinux:8
options: --cpus 1
steps:
- name: Download Prometheus Artifacts
uses: actions/download-artifact@v3
with:
name: packages
- name: Install RPM packages
run: dnf localinstall -y *.x86_64.rpm
- name: Start Prometheus
run: |
/usr/bin/prometheus --config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/var/lib/prometheus/data \
--web.console.templates=/var/lib/prometheus/consoles \
--web.console.libraries=/var/lib/prometheus/console_libraries \
--web.enable-lifecycle &>/dev/null &
- name: Check Prometheus
run: curl http://localhost:9090/-/healthy
- name: Start node_exporter
run: /usr/bin/node_exporter &>/dev/null &
- name: Check node_exporter
run: curl -I http://localhost:9100/metrics
- name: Start postgres_exporter
run: /usr/bin/postgres_exporter &>/dev/null &
- name: Check postgres_exporter
run: curl -I http://localhost:9187/metrics