Skip to content

Workflow file for this run

name: Test Zeek artifact against many pcaps
on:
push:
branches:
- pcap-test
workflow_dispatch:
jobs:
test:
strategy:
matrix:
platform: [windows-2019]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout build-zeek
uses: actions/checkout@v3
- name: Install wget on Windows
if: startsWith(matrix.platform, 'windows-')
run: choco install -y --no-progress wget
shell: cmd
- name: Run tests
run: |
set -xv
wget --quiet https://github.com/brimdata/build-zeek/releases/download/v6.2.0-brim-dev1/zeek-v6.2.0-brim-dev1.windows-amd64.zip
unzip -q zeek-v6.2.0-brim-dev1.windows-amd64.zip
mv zeek/share/zeek/site/local.zeek zeek/share/zeek/site/local.zeek.orig
sed "/detect-MHR/d" zeek/share/zeek/site/local.zeek.orig > zeek/share/zeek/site/local.zeek
for filename in $(wget -O - https://archive.wrccdc.org/pcaps/2018/ | sed 's/.*href="//' | sed 's/".*$//'); do
echo "Testing with $filename"
wget --quiet https://archive.wrccdc.org/pcaps/2018/$filename
gzip -d $filename
cat ${filename/.gz/} | zeek/zeekrunner -
echo $?
ls -l *.log
rm *.log ${filename/.gz/}
done
shell: sh