1
0
Fork 0
mirror of synced 2024-05-20 12:42:39 +12:00
appwrite/.travis.yml_tmp

90 lines
2.3 KiB
Plaintext
Raw Normal View History

dist: focal
2021-01-19 18:03:18 +13:00
arch:
- amd64
- arm64-graviton2
os: linux
2021-09-17 00:45:53 +12:00
vm:
2021-09-16 23:34:23 +12:00
size: large
2021-09-17 00:45:53 +12:00
2021-01-19 17:59:54 +13:00
language: shell
2020-10-13 21:51:41 +13:00
2019-08-07 09:01:52 +12:00
notifications:
email:
2019-09-22 04:54:18 +12:00
- team@appwrite.io
2019-08-26 16:56:01 +12:00
2020-07-06 08:37:41 +12:00
before_install:
# Install latest Docker
2021-01-15 11:33:41 +13:00
- curl -fsSL https://get.docker.com | sh
# Enable Buildkit in Docker config
2021-01-15 11:33:41 +13:00
- 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
# Login to increase Docker Hub ratelimit
2021-01-15 11:33:41 +13:00
- >
if [ ! -z "${DOCKERHUB_PULL_USERNAME:-}" ]; then
2021-01-17 04:10:20 +13:00
echo "${DOCKERHUB_PULL_PASSWORD}" | docker login --username "${DOCKERHUB_PULL_USERNAME}" --password-stdin
2021-01-15 11:33:41 +13:00
fi
- docker --version
# Install latest Compose
- sudo rm /usr/local/bin/docker-compose
2021-09-02 07:44:27 +12:00
- curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose --version
# Enable Buildkit
- docker buildx create --name travis_builder --use
2021-09-02 07:44:27 +12:00
- export COMPOSE_INTERACTIVE_NO_CLI
- export DOCKER_BUILDKIT=1
- export COMPOSE_DOCKER_CLI_BUILD=1
- export BUILDKIT_PROGRESS=plain
2021-04-30 03:08:59 +12:00
# Only pass a single runtime for CI stability
- echo "_APP_FUNCTIONS_RUNTIMES=php-8.0" >> .env
# Ensure Travis scripts are executable
- chmod -R u+x ./.travis-ci
2020-07-06 08:37:41 +12:00
2019-08-26 16:56:01 +12:00
install:
2021-09-02 07:06:21 +12:00
- docker-compose pull
2021-09-16 09:15:37 +12:00
# Upstream bug causes buildkit pulls to fail so prefetch base images
# https://github.com/moby/moby/issues/41864
- docker pull composer:2.0
- docker pull php:8.0-cli-alpine
2021-09-02 07:39:38 +12:00
- docker-compose build
2021-09-02 07:06:21 +12:00
- docker-compose up -d
2021-04-28 22:48:02 +12:00
- sleep 10
2019-08-26 16:56:01 +12:00
2019-08-07 09:01:52 +12:00
script:
2021-05-05 10:16:25 +12:00
- docker ps -a
# Tests should fail if any container is in exited status
- ALL_UP=`docker ps -aq --filter "status=exited"`
- >
if [[ "$ALL_UP" != "" ]]; then
exit 1
fi
2021-04-27 04:22:29 +12:00
- docker-compose logs appwrite
2021-12-22 03:22:18 +13:00
- docker-compose logs appwrite-realtime
2021-05-05 10:16:25 +12:00
- docker-compose logs mariadb
2021-04-27 04:22:29 +12:00
- docker-compose logs appwrite-worker-functions
- docker-compose exec appwrite doctor
- docker-compose exec appwrite vars
2021-04-28 21:04:44 +12:00
- docker-compose exec appwrite test --debug
2021-08-17 16:06:42 +12:00
- docker-compose logs appwrite
2021-01-19 17:59:54 +13:00
after_script:
# travis re-uses their build nodes so clean them up
- docker buildx rm travis_builder
2021-08-19 02:14:34 +12:00
after_failure:
- docker-compose logs appwrite
2021-01-19 17:59:54 +13:00
deploy:
- provider: script
edge: true
script: ./.travis-ci/deploy.sh
2021-01-19 17:59:54 +13:00
on:
repo: appwrite/appwrite
branch: deploy