Skip to content

Commit 38e93ac

Browse files
committed
add github ci testing
1 parent 51aac9d commit 38e93ac

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: cachix/install-nix-action@v31
16+
with:
17+
nix_path: nixpkgs=channel:nixos-unstable
18+
19+
- uses: cachix/cachix-action@v16
20+
with:
21+
name: devenv
22+
23+
- name: Run tests
24+
run: nix develop --command make test

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Was Geht
22

3+
[![CI](https://github.com/kylerisse/wasgeht/actions/workflows/ci.yml/badge.svg)](https://github.com/kylerisse/wasgeht/actions/workflows/ci.yml)
4+
35
## Overview
46

5-
**Was Geht** is a small Go application that pings a list of hosts at regular intervals, tracks their availability (UP or DOWN), and records the latency in a Round Robin Database (RRD). A lightweight web interface serves host status information and interactive graphs of the recorded latency.
7+
**Was Geht** is a small Go application that monitors a list of hosts at regular intervals, tracks their availability and metrics, and records the data in Round Robin Databases (RRD). A lightweight web interface serves host status information and interactive graphs of the recorded metrics.
68

79
## Features
810

11+
- **Extensible Check System**: Modular check types (ping, with more planned) via a Registry/Factory pattern.
912
- **Ping Monitoring**: Sends ICMP Echo Requests to check host availability.
1013
- **Latency Logging**: Uses RRD to store latency data over time.
1114
- **Graphs Generation**: Generates historical latency graphs (15 minutes, 4 hours, 8 hours, etc.) for each host.
@@ -27,7 +30,7 @@ nix develop
2730

2831
You will need experimental features `flakes` and `nix-command`.
2932

30-
This loads the environment specified in `shell.nix`:
33+
This loads the environment specified in `flake.nix`:
3134

3235
- Go (for building),
3336
- gnumake (for Makefile),
@@ -41,7 +44,7 @@ Once inside the shell, you can run the usual make commands
4144

4245
Ensure the following are installed:
4346

44-
- **Go** (1.23+ recommended)
47+
- **Go** (1.25+ recommended)
4548
- **air** (for live reload during development, optional)
4649
- **rrdtool** and **unixtools ping** must be installed and available on the system path.
4750
- Basic Unix tools for building and running (`make`, etc.).
@@ -126,6 +129,7 @@ Each check type gets its own RRD file (e.g., `ping.rrd`), making it straightforw
126129

127130
## Makefile Targets
128131

132+
- **test**: Runs staticcheck and `go test` with race detection.
129133
- **build**: Compiles the Go code and produces `wasgehtd`.
130134
- **deps**: Verifies module dependencies and updates `go.mod` and `go.sum`.
131135
- **clean**: Removes the `wasgehtd` binary and any generated graphs.

0 commit comments

Comments
 (0)