Skip to content

Use pre-built dependency image for CI to avoid duplicate installs of slips for each unit/integration test file #800

Use pre-built dependency image for CI to avoid duplicate installs of slips for each unit/integration test file

Use pre-built dependency image for CI to avoid duplicate installs of slips for each unit/integration test file #800

name: integration-tests
on:
pull_request:
branches:
- 'master'
- 'develop'
jobs:
integration-tests:
runs-on: ubuntu-22.04
timeout-minutes: 1800
container:
image: stratosphereips/slips_dependencies
# TensorFlow + multiprocessing + pytest -n can hit /dev/shm limits.
options: --shm-size=2g
# suppress tensorflow warnings
env:
TF_CPP_MIN_LOG_LEVEL: 3
TF_ENABLE_ONEDNN_OPTS: 0
strategy:
matrix:
test_file:
- test_config_files.py
- test_portscans.py
- test_dataset.py
- test_pcap_dataset.py
- test_zeek_dataset.py
- test_fides.py
- test_iris.py
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.ref }}
fetch-depth: ''
- name: Start Redis
uses: ./.github/actions/start-redis
- name: Run Integration Tests for ${{ matrix.test_file }}
run: |
python3 -m pytest tests/integration_tests/${{ matrix.test_file }} -p no:warnings -vv -s -n 3
- name: Upload Artifacts
if: always()
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.test_file }}-integration-tests-output
path: |
output/integration_tests