-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (41 loc) · 1.26 KB
/
test-suite.yaml
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
name: Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
tests:
name: "Python ${{matrix.python-version}}"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y snmpd libsnmp-dev libperl-dev snmp-mibs-downloader valgrind
sudo systemctl stop snmpd
sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig
sudo cp tests/snmpd.conf /etc/snmp/snmpd.conf
sudo download-mibs
mkdir -p -m 0755 ~/.snmp
echo 'mibs +ALL' > ~/.snmp/snmp.conf
sudo systemctl restart snmpd
python -m pip install --upgrade pip
pip install -r requirements-dev.lock
- name: Test with pytest
run: |
pytest
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
files: coverage.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}