Merge pull request #5 from bengo237/dev #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |