-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from lohanidamodar/feat-utopia-db-integration
first draft using utopia-php database
- Loading branch information
Showing
13 changed files
with
4,392 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
composer.lock | ||
/vendor/ | ||
/.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,40 @@ | ||
language: php | ||
dist: xenial | ||
|
||
php: | ||
- 7.4 | ||
- 8.0 | ||
- nightly | ||
arch: | ||
- amd64 | ||
|
||
os: linux | ||
|
||
language: shell | ||
|
||
services: | ||
- mysql | ||
- docker | ||
|
||
notifications: | ||
email: | ||
- team@appwrite.io | ||
|
||
before_script: docker run --rm --interactive --tty --volume "$(pwd)":/app composer update --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist | ||
|
||
before_install: | ||
- mysql < data/schema.sql | ||
- curl -fsSL https://get.docker.com | sh | ||
- echo '{"experimental":"enabled"}' | sudo tee /etc/docker/daemon.json | ||
- mkdir -p $HOME/.docker | ||
- echo '{"experimental":"enabled"}' | sudo tee $HOME/.docker/config.json | ||
- sudo service docker start | ||
- > | ||
if [ ! -z "${DOCKERHUB_PULL_USERNAME:-}" ]; then | ||
echo "${DOCKERHUB_PULL_PASSWORD}" | docker login --username "${DOCKERHUB_PULL_USERNAME}" --password-stdin | ||
fi | ||
- docker --version | ||
|
||
before_script: composer install --ignore-platform-reqs | ||
install: | ||
- docker-compose up -d | ||
- sleep 10 | ||
|
||
script: | ||
- vendor/bin/phpunit --configuration phpunit.xml | ||
- vendor/bin/psalm --show-info=true | ||
- docker ps | ||
- docker-compose exec php7.4 vendor/bin/phpunit --configuration phpunit.xml tests | ||
- docker-compose exec php7.4 vendor/bin/psalm --show-info=true | ||
- docker-compose exec php8 vendor/bin/phpunit --configuration phpunit.xml tests | ||
- docker-compose exec php8 vendor/bin/psalm --show-info=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM composer:2.0 as step0 | ||
|
||
WORKDIR /src/ | ||
|
||
COPY ./composer.json /src/ | ||
COPY ./composer.lock /src/ | ||
|
||
RUN composer update --ignore-platform-reqs --optimize-autoloader \ | ||
--no-plugins --no-scripts --prefer-dist | ||
|
||
FROM php:7.4-cli-alpine as final | ||
|
||
LABEL maintainer="team@appwrite.io" | ||
|
||
RUN docker-php-ext-install pdo_mysql | ||
|
||
WORKDIR /code | ||
|
||
COPY --from=step0 /src/vendor /code/vendor | ||
|
||
# Add Source Code | ||
COPY ./tests /code/tests | ||
COPY ./src /code/src | ||
COPY ./phpunit.xml /code/phpunit.xml | ||
COPY ./psalm.xml /code/psalm.xml | ||
|
||
CMD [ "tail", "-f", "/dev/null" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM composer:2.0 as step0 | ||
|
||
WORKDIR /src/ | ||
|
||
COPY composer.lock /src/ | ||
COPY composer.json /src/ | ||
|
||
RUN composer update --ignore-platform-reqs --optimize-autoloader \ | ||
--no-plugins --no-scripts --prefer-dist | ||
|
||
FROM php:8.0-cli-alpine as final | ||
|
||
LABEL maintainer="team@appwrite.io" | ||
|
||
RUN docker-php-ext-install pdo_mysql | ||
|
||
WORKDIR /code | ||
|
||
COPY --from=step0 /src/vendor /code/vendor | ||
|
||
# Add Source Code | ||
COPY ./tests /code/tests | ||
COPY ./src /code/src | ||
COPY ./phpunit.xml /code/phpunit.xml | ||
COPY ./psalm.xml /code/psalm.xml | ||
|
||
CMD [ "tail", "-f", "/dev/null" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.