Support ip ranges in the client_ip param in slips.yaml #183
Workflow file for this run
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: integration-tests | |
on: | |
pull_request: | |
branches: | |
- 'master' | |
- 'develop' | |
jobs: | |
# uses the common workflow that builds slips | |
install-dependencies-using-reusable-workflow: | |
uses: ./.github/workflows/install-slips-dependencies.yml | |
integration-tests: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 1800 | |
# make this job depend on the first job | |
needs: install-dependencies-using-reusable-workflow | |
strategy: | |
matrix: | |
test_file: | |
- test_config_files.py | |
- test_portscans.py | |
- test_dataset.py | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
fetch-depth: '' | |
- name: Restore Zeek Build from Cache | |
id: zeek-cache | |
uses: actions/cache@v4 | |
with: | |
path: /opt/zeek | |
key: zeek-cache | |
- name: Restore APT cache | |
id: apt-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
/var/cache/apt/archives | |
/var/lib/apt/lists | |
key: apt-cache | |
- name: Install Zeek | |
run: | | |
sudo echo 'deb http://download.opensuse.org/repositories/security:/zeek/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/security:zeek.list | |
curl -fsSL https://download.opensuse.org/repositories/security:zeek/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/security_zeek.gpg > /dev/null | |
sudo apt update && sudo apt install -y --no-install-recommends --fix-missing zeek | |
sudo ln -s /opt/zeek/bin/zeek /usr/local/bin/bro | |
- name: Install apt dependencies (from cache if possible) | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y $(cat install/apt_dependencies.txt) | |
- name: Install Python dependencies (from cache if possible) | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -r install/requirements.txt | |
- name: Start redis server | |
run: redis-server --daemonize yes | |
- name: Run Integration Tests for ${{ matrix.test_file }} | |
run: | | |
python3 -m pytest tests/integration_tests/${{ matrix.test_file }} -p no:warnings -vv -s -n 5 | |
- name: Upload Artifacts | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test_slips_locally-integration-tests-output | |
path: | | |
output/integration_tests |