Skip to content

Commit

Permalink
Merge pull request #481 from darless/github-workflows
Browse files Browse the repository at this point in the history
Github actions added to perform lint and compile
  • Loading branch information
rewolff authored Aug 10, 2023
2 parents ab6f80f + 4fc3361 commit ad48183
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[flake8]

select =
E902,
E999,
S,
F,

ignore =
F821

per-file-ignores =
test/*: S603,S404

35 changes: 35 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test compilation
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install flake8
run: pip3 install flake8==3.9.2 flake8-bandit==2.1.2 bandit==1.7.2
- name: Run flake8
run: python3 -m flake8 .
compile-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: egor-tensin/[email protected]
with:
version: latest
platform: x64
- name: Bootstrap
run: ./bootstrap.sh
- name: Configure
run: ./configure --without-gtk --without-jansson
- name: Make
run: make -j $(nproc)
- name: Run sample mtr against 1.1.1.1
run: ./mtr --report --report-cycles 1 -m 1 1.1.1.1
- name: Run test - cmdparse.py
run: python3 ./test/cmdparse.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ stamp-h1*
/test/*.py.trs

/mtr-*.tar.gz
*.swp
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ m4_ifndef([PKG_CHECK_MODULES], [m4_defun([PKG_CHECK_MODULES], [AC_MSG_ERROR(
[Could not locate the pkg-config autoconf macros. These are usually located
in /usr/share/aclocal/pkg.m4. If your macros are in a different location,
try setting the environment variable ACLOCAL_OPTS="-I/other/macro/dir"
before running ./bootstrap.sh again, or configure --without-gtk ----without-jansson ])])
before running ./bootstrap.sh again, or configure --without-gtk --without-jansson ])])
])
PKG_PROG_PKG_CONFIG

Expand Down
1 change: 0 additions & 1 deletion test/probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ def test_parallel_probes(self):
required_success = int(loop_count * 0.90)
self.assertGreaterEqual(success_count, required_success)


class TestProbeICMPv6(mtrpacket.MtrPacketTest):
'''Test sending probes using IP version 6'''

Expand Down

0 comments on commit ad48183

Please sign in to comment.