Skip to content

Commit

Permalink
Merge pull request #11 from losten-git/master
Browse files Browse the repository at this point in the history
Added SNMPSIM to pipeline
  • Loading branch information
RincewindsHat authored Jul 23, 2024
2 parents c14d328 + 8fe6d6b commit 32c2746
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 44 deletions.
7 changes: 0 additions & 7 deletions .github/prepare_ubuntu.sh

This file was deleted.

2 changes: 2 additions & 0 deletions .github/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
snmpsim-data-lextudio
snmpsim-lextudio
79 changes: 79 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build check_cisco_health

on:
pull_request:
branches: ["*"]

jobs:
build:
runs-on: ubuntu-latest
env:
CFLAGS: "-Wall -Wextra -Werror"

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip

- name: Install pip packages
run: pip install -r .github/requirements.txt

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libsnmp-dev

- name: Make
run: make

- name: Start simmulation
run: |
setup-snmpsim-data /tmp/data
snmpsim-command-responder --daemonize --pid-file /tmp/snmp --data-dir=/tmp/data/network/switch --agent-udpv4-endpoint=127.0.0.1:1611
- name: Sleep
run: sleep 60s
shell: bash

- name: check_cisco_health
run: |
chmod 0755 check_cisco_health
./check_cisco_health -h 127.0.0.1:1611 -c cisco-c3750 -t 30000
clang-build:
runs-on: ubuntu-latest
env:
CC: clang
CFLAGS: "-Wall -Wextra"

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip

- name: Install pip packages
run: pip install -r .github/requirements.txt

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libsnmp-dev

- name: Make
run: make

- name: Start simmulation
run: |
setup-snmpsim-data /tmp/data
snmpsim-command-responder --daemonize --pid-file /tmp/snmp --data-dir=/tmp/data/network/switch --agent-udpv4-endpoint=127.0.0.1:1611
- name: Sleep
run: sleep 60s
shell: bash

- name: check_cisco_health
run: |
chmod 0755 check_cisco_health
./check_cisco_health -h 127.0.0.1:1611 -c cisco-c3750 -t 30000
37 changes: 0 additions & 37 deletions .github/workflows/makefile.yml

This file was deleted.

0 comments on commit 32c2746

Please sign in to comment.