Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+ Unit Tests #2

Merged
merged 4 commits into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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