Skip to content

Commit

Permalink
Update build-test.yml to use GITHUB_WORKSPACE
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl authored Feb 8, 2025
1 parent 0245e48 commit b49d579
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,23 @@ jobs:
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: Set up output directory
run: echo "output_dir=${GITHUB_WORKSPACE}/report" >> $GITHUB_ENV

- name: Create output directory
run: mkdir -p ${GITHUB_WORKSPACE}/report

- name: Run goaccess single thread
run: ./goaccess access.log --log-format=VCOMBINED -o ./report.html
run: ./goaccess access.log --log-format=VCOMBINED -o ${output_dir}/report.html

- name: Run goaccess multi-thread
run: ./goaccess access.log --log-format='%v:%^ %h %^[%x] "%r" %s %b "%R" "%u"' --datetime-format='%d/%b/%Y:%H:%M:%S %z' -o ./report.html -j 2 -a --tz="Europe/Berlin"
run: ./goaccess access.log --log-format='%v:%^ %h %^[%x] "%r" %s %b "%R" "%u"' --datetime-format='%d/%b/%Y:%H:%M:%S %z' -o ${output_dir}/report.html -j 2 -a --tz="Europe/Berlin"

- 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 .
./goaccess access.log --log-format=VCOMBINED -o ${output_dir}/report.json -j 2 -a --json-pretty-print
cat ${output_dir}/report.json | jq .
- name: Make distclean
run: sudo make distclean

0 comments on commit b49d579

Please sign in to comment.