-
Notifications
You must be signed in to change notification settings - Fork 45
/
.travis.yml
25 lines (20 loc) · 1.21 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
language: generic
dist: focal
before_script:
- export TZ=Europe/London
- date
# - sudo ntpdate ntp.ubuntu.com
- '[ ! -z "$DOCKER_PASS" ] && { echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin; } || :'
services:
- docker
- xvfb
jobs:
include:
- # PR builds - phpunit
if: type = pull_request
script: PUID=$(id -u) TESTS_TO_RUN="PHPUNIT-SAMPLE;PHPUNIT-FIXTURES" BUILD_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH OE_DEFAULT_BRANCH=$TRAVIS_BRANCH COMMIT_ID=$TRAVIS_COMMIT BUILD_ID=$TRAVIS_BUILD_ID BUILD_NUMBER=$TRAVIS_BUILD_NUMBER docker-compose -f protected/tests/docker-compose.yml run -v "$HOME/.ssh/id_rsa:/run/secrets/SSH_PRIVATE_KEY" --use-aliases web
name: "All tests"
- # Branch builds - phpunit fixtures
if: type = push AND (branch in (master, develop) OR branch =~ /^release\/\S*$/ OR branch =~ /^bugfix\/\S*$/)
script: PUID=$(id -u) TESTS_TO_RUN="PHPUNIT-SAMPLE;PHPUNIT-FIXTURES" BUILD_BRANCH=$TRAVIS_BRANCH COMMIT_ID=$TRAVIS_COMMIT BUILD_ID=$TRAVIS_BUILD_ID BUILD_NUMBER=$TRAVIS_BUILD_NUMBER docker-compose -f protected/tests/docker-compose.yml run -v "$HOME/.ssh/id_rsa:/run/secrets/SSH_PRIVATE_KEY" --use-aliases web
name: "All tests (branch)"