Skip to content

Commit e7d36e8

Browse files
committed
Add Github action for running the test case
1 parent 16873a4 commit e7d36e8

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/workflows/tests.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
branches: '*'
6+
7+
workflow_dispatch:
8+
inputs:
9+
branch:
10+
description: 'The branch, tag or SHA to release from'
11+
required: true
12+
default: 'master'
13+
14+
jobs:
15+
tests:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
python: [3.6]
20+
os: [ubuntu-latest]
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
with:
25+
ref: ${{ github.event.inputs.branch }}
26+
- name: Use Python ${{ matrix.python }}
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ matrix.python }}
30+
31+
- name: Install test dependencies
32+
run: python -m pip install pytest
33+
34+
- name: Install current version of the clamd package
35+
run: python -m pip install -e .
36+
37+
- name: Install and update clamav engine
38+
run: |
39+
sudo apt update
40+
sudo apt-get install clamav-daemon clamav-freshclam clamav-unofficial-sigs --yes
41+
sudo systemctl stop clamav-freshclam.service
42+
sudo freshclam --verbose
43+
sudo systemctl restart clamav-daemon.service
44+
45+
- name: Run unit tests
46+
run: pytest

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ exclude =
3434

3535
[bdist_wheel]
3636
universal = 1
37+
38+
[flake8]
39+
max_line_length = 117

0 commit comments

Comments
 (0)