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

feat: utopia compression #146

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 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
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ jobs:
- name: Run Swoole Tests
run: docker compose exec swoole vendor/bin/phpunit --configuration phpunit.xml

- name: Run Swoole Corotuine Tests
- name: Run Swoole Coroutine Tests
run: docker compose exec swoole-coroutine vendor/bin/phpunit --configuration phpunit.xml

- name: Run Swoole Compression Tests
run: docker compose exec swoole-compression vendor/bin/phpunit --configuration phpunit.xml
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ $ git push origin [name_of_your_new_branch]
- `docker compose exec fpm vendor/bin/phpunit --configuration phpunit.xml`
- `docker compose exec swoole vendor/bin/phpunit --configuration phpunit.xml`
- `docker compose exec swoole-coroutine vendor/bin/phpunit --configuration phpunit.xml`
- `docker compose exec swoole-compression vendor/bin/phpunit --configuration phpunit.xml`

## Introducing New Features

Expand Down
48 changes: 48 additions & 0 deletions Dockerfile.swoole_compression
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM composer:2.0 AS step0

ARG TESTING=true
ARG DEBUG=false

ENV TESTING=$TESTING
ENV DEBUG=$DEBUG

WORKDIR /usr/local/src/

COPY composer.* /usr/local/src/

RUN composer install --ignore-platform-reqs --optimize-autoloader \
--no-plugins --no-scripts --prefer-dist \
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`

FROM appwrite/base:0.9.0 as final

ARG TESTING=true
ARG DEBUG=false

ENV TESTING=$TESTING
ENV DEBUG=$DEBUG

LABEL maintainer="team@appwrite.io"

RUN \
if [ "$DEBUG" == "true" ]; then \
apk add boost boost-dev; \
fi

WORKDIR /usr/src/code

COPY ./dev /usr/src/code/dev
COPY ./src /usr/src/code/src
COPY ./tests /usr/src/code/tests
COPY ./phpunit.xml /usr/src/code/phpunit.xml
COPY ./phpbench.json /usr/src/code/phpbench.json
COPY --from=step0 /usr/local/src/vendor /usr/src/code/vendor

# Enable Extensions
RUN if [ "$DEBUG" == "true" ]; then cp /usr/src/code/dev/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini; fi
RUN if [ "$DEBUG" = "false" ]; then rm -rf /usr/src/code/dev; fi
RUN if [ "$DEBUG" = "false" ]; then rm -f /usr/local/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so; fi

EXPOSE 80

CMD ["php", "tests/e2e/server-swoole-compression.php"]
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@
"require": {
"php": ">=8.0",
"ext-swoole": "*",
"utopia-php/servers": "0.1.*"
"utopia-php/servers": "0.1.*",
"utopia-php/compression": "dev-feat-utopia-compression"
},
"repositories": {
"utopia-php/compression": {
"type": "git",
"url": "https://github.com/utopia-php/compression"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed now that the package was published.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

},
"require-dev": {
"ext-xdebug": "*",
Expand Down
Loading
Loading