-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
64 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,65 +1,7 @@ | ||
# Default Travis CI config for Altis | ||
os: linux | ||
dist: xenial | ||
# Import Travis configuration from dev-tools repo | ||
version: ~> 1.0 | ||
import: | ||
- source: humanmade/altis-dev-tools:travis/module.yml@e6b35cd | ||
mode: deep_merge_append | ||
|
||
# Ensure PHP CLI and Composer are available | ||
language: php | ||
php: | ||
- '7.4' | ||
|
||
# Set NodeJS version to match the build server. | ||
node_js: | ||
- 12 | ||
|
||
# Ensure docker-compose is available | ||
services: | ||
- docker | ||
|
||
# Configure local-server to ensure startup will complete in Travis CI | ||
env: | ||
global: | ||
- COMPOSE_HTTP_TIMEOUT=360 | ||
- ES_MEM_LIMIT=2g | ||
|
||
# Default notification settings | ||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: change | ||
|
||
# Cache composer dependencies by default | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
# Ensure correct node version is used for build | ||
before_install: | ||
# Exit early if no tests are found | ||
- test -n "$(find $TRAVIS_BUILD_DIR/tests -name '*.suite.yml' 2>/dev/null)" || exit 0 | ||
- nvm install v12 | ||
- nvm use v12 | ||
# Authenticate with docker hub. | ||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
|
||
# We handle installation via composer create-project | ||
install: skip | ||
|
||
# Only run for target branch | ||
branches: | ||
only: | ||
- master | ||
- main | ||
- /v\d+-branch/ | ||
- travis | ||
|
||
before_script: | ||
# Install Altis and start the local server | ||
- composer create-project altis/skeleton:dev-$TRAVIS_BRANCH --stability=dev $HOME/test-root || exit 1 | ||
# Require the current module and alias the branch to be tested to the target version main branch | ||
- cd $HOME/test-root && composer require "$ALTIS_PACKAGE:dev-$TRAVIS_PULL_REQUEST_BRANCH as dev-$TRAVIS_BRANCH" | ||
|
||
script: | ||
# Start local server | ||
- cd $HOME/test-root && composer serve | ||
# Run Codeception for module tests, if test suites are found. | ||
- cd $HOME/test-root && composer dev-tools codecept run -p vendor/$ALTIS_PACKAGE/tests | ||
# Add your custom config below, which will merge with the default module config from the section above. |