Test Packages #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |