Skip to content

Commit

Permalink
Add automated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmervdl committed Nov 9, 2023
1 parent 483b34a commit f613a80
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Ubuntu

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: dependencies
run: sudo apt-get install -y build-essential libboost-test-dev libboost-program-options-dev cmake zlib1g-dev libbz2-dev liblzma-dev libicu-dev uchardet libuchardet-dev libzip-dev wget
- name: cmake
run: |
cmake -E make_directory build
cd build
cmake ..
- name: Compile
working-directory: build
run: cmake --build . -j2
- name: Unit Tests
working-directory: build
run: ctest -j2
- name: Regression Tests
working-directory: tests
run: |
../build/bin/warc2text -v --json hello-world.warc.gz > hello-world.json
shasum -c checksums.txt
1 change: 1 addition & 0 deletions tests/checksums.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
28d6c5e68f9e8c3275015ff1bd082fce3382441a hello-world.json
1 change: 1 addition & 0 deletions tests/hello-world.json.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"f":"./hello-world.warc.gz","o":907,"s":723,"rs":11,"ps":12,"l":"en","u":"http://iipc.github.io/warc-specifications/primers/web-archive-formats/hello-world.txt","c":"text/plain","ts":"2015-07-08T21:55:13Z","p":"Hello World\n"}
Binary file added tests/hello-world.warc.gz
Binary file not shown.

0 comments on commit f613a80

Please sign in to comment.