From ed6830dc604fed4cf25f7d2a541d0c6fe867ca6b Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Sun, 7 Apr 2024 22:27:47 -0700 Subject: [PATCH] + Unit Tests (#2) * Didn't really mean to push that to main * Update unittest.yml * Update unittest.yml * Should now pass --- .github/workflows/unittest.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index e36bf58..bed7c40 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -36,19 +36,20 @@ jobs: - name: Start the server working-directory: tests - run: nohup php -S localhost:8000 + run: nohup php -S localhost:8000 & - name: Test gzip run: | output=$(curl localhost:8000 -s -H "Accept-Encoding: gzip" | gzip -d -) - echo "$output" + if [ ! "$output" == "Hello, world!" ]; then exit 1; fi - name: Test brotli run: | output=$(curl localhost:8000 -s -H "Accept-Encoding: br" | brotli -d -) - echo "$output" + if [ ! "$output" == "Hello, world!" ]; then exit 1; fi - - name: Test zstd - run: | - output=$(curl localhost:8000 -s -H "Accept-Encoding: zstd" | zstd -d -) - echo "$output" + # TODO: zstd appears to not be installed / loaded in PHP + #- name: Test zstd + # run: | + # output=$(curl localhost:8000 -s -H "Accept-Encoding: zstd" | zstd -d -) + # if [ ! "$output" == "Hello, world!" ]; then exit 1; fi