testing workflow #2
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: SNMPSIM CI | |
on: | |
pull_request: | |
branches: ["*"] | |
jobs: | |
check_funktion: | |
runs-on: ubuntu-latest | |
env: | |
CFLAGS: "-Wall -Wextra -Werror" | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Create sim user | |
# run: useradd -s /bin/bash -m sim | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: pip | |
- name: Install pip packages | |
run: pip install -r .github/requirements.txt | |
- name: Install dependencies | |
run: | | |
sudo .github/prepare_ubuntu.sh | |
- name: Make | |
run: make | |
- name: Start simmulation | |
run: | | |
setup-snmpsim-data /tmp/data | |
/opt/hostedtoolcache/Python/3.10.14/x64/bin/snmpsim-command-responder --daemonize --pid-file /tmp/snmp --logging-method=file:/tmp/log_snmp --log-level debug --data-dir=/tmp/data/network/router --agent-udpv4-endpoint=127.0.0.1:1611 | |
- name: Sleep | |
run: sleep 60s | |
shell: bash | |
- name: check_cisco_health | |
run: | | |
cat /tmp/log_snmp | |
chmod 0755 check_cisco_health | |
./check_cisco_health -h 127.0.0.1:1611 -c cisco-unmarked-0 -t 60000 |