-
Notifications
You must be signed in to change notification settings - Fork 47
56 lines (48 loc) · 1.43 KB
/
tests.yml
File metadata and controls
56 lines (48 loc) · 1.43 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Tests
on:
pull_request:
branches: '*'
workflow_dispatch:
inputs:
branch:
description: 'The branch, tag or SHA to release from'
required: true
default: 'master'
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [3.6]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install test dependencies
run: python -m pip install pytest
- name: Install current version of the clamd package
run: python -m pip install -e .
- name: Install and update clamav engine
run: |
sudo apt update
sudo apt-get install clamav-daemon clamav-freshclam clamav-unofficial-sigs --yes
sudo systemctl stop clamav-freshclam.service
sudo freshclam --verbose
sudo systemctl restart clamav-daemon.service
- name: Wait for 25 seconds until clamd socket becomes available
run: |
secs=25
while [[ $secs -gt 0 ]] && ! [[ -f "/var/run/clamav/clamd.ctl" ]];
do
echo -ne "$secs\033[0K\r"
sleep 1
: $((secs--))
done
- name: Run unit tests
run: pytest