-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.07 KB
/
snort-build-test.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
44
45
46
name: Snort 3 Build and Remove Test
on: [push, pull_request]
jobs:
test-snort:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libpcap-dev
- name: Run installation script
run: |
chmod +x ./build/build.sh
sudo bash ./build/build.sh
- name: Verify Snort installation
run: |
snort -V
sudo systemctl status snort
- name: Run uninstallation script
run: |
chmod +x ./build/remove.sh
sudo bash ./build/remove.sh
- name: Verify Snort uninstallation
run: |
if command -v snort &> /dev/null; then
echo "Snort is still installed"
exit 1
else
echo "Snort has been successfully uninstalled"
fi