From 6c68a6e2b8f4a9f62692a33ce9cbe8d8d8527cf5 Mon Sep 17 00:00:00 2001 From: Gerardo O Date: Wed, 10 Jan 2024 19:36:27 -0600 Subject: [PATCH] Added basic run tests to build workflow. --- .github/workflows/build-test.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index eca2bf79b9..056f7eccac 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -9,21 +9,24 @@ on: jobs: build: runs-on: ${{ matrix.os }} - + strategy: matrix: - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-latest, macos-latest] include: - os: ubuntu-latest - setup-env: sudo apt-get update && sudo apt-get install -y build-essential autoconf gettext autopoint libncursesw5-dev libssl-dev git libmaxminddb-dev + setup-env: sudo apt-get update && sudo apt-get install -y build-essential autoconf gettext autopoint libncursesw5-dev libssl-dev git libmaxminddb-dev jq - os: macos-latest - setup-env: brew update && brew install ncurses gettext autoconf automake libmaxminddb + setup-env: brew update && brew install ncurses gettext autoconf automake libmaxminddb jq steps: - name: Setup env. run: ${{ matrix.setup-env }} - uses: actions/checkout@v3 - - name: autoreconf + - name: Check Architecture + run: | + echo "Running on $(uname -m) architecture" + - name: autoreconf run: autoreconf -fiv - name: configure run: ./configure @@ -33,3 +36,18 @@ jobs: run: sudo make check - name: make distcheck run: sudo make distcheck + - name: define log + run: | + echo -e 'localhost:80 192.168.0.1 - - [01/Jul/2013:06:20:38 -0500] "GET / HTTP/1.1" 200 3829 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0"\ + google.com:80 ::1 - - [01/Jul/2013:06:25:11 -0500] "OPTIONS * HTTP/1.0" 200 136 "-" "Apache (internal dummy connection)"\ + bing.com:80 142.250.190.142 - - [01/Jul/2013:06:41:31 -0500] "-" 408 0 "-" "-"\ + yahoo.com:80 74.6.143.25 - - [01/Jul/2013:07:20:02 -0500] "HEAD / HTTP/1.1" 200 213 "-" "Wget/1.14 (linux-gnu)"' > access.log + cat access.log + - name: Run goaccess single thread + run: ./goaccess access.log --log-format=VCOMBINED -o report.html + - name: Run goaccess multi-thread + run: ./goaccess access.log --log-format=VCOMBINED -o report.html -j 2 -a + - name: Run goaccess multi-thread JSON output + run: | + ./goaccess access.log --log-format=VCOMBINED -o report.json -j 2 -a --json-pretty-print + cat report.json | jq .