forked from nunomaduro/phpinsights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (40 loc) · 1.06 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
language: php
sudo: false
services:
- docker
php:
- 7.2
- 7.3
- 7.4snapshot
env:
- COMPOSER_FLAGS="--prefer-lowest"
- COMPOSER_FLAGS=""
before_script:
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
script:
- |
if [[ -z $COMPOSER_FLAGS ]]; then
composer run test
else
composer run phpstan:test
composer run ecs:test
composer run phpunit:test
composer run insights -- --disable-security-check
fi
- rm -rf vendor/
- composer install --no-dev
- composer run insights -- --disable-security-check
jobs:
include:
- stage: build docker image
if: tag IS present
php: 7.3
env: COMPOSER_FLAGS=""
script:
- rm -rf vendor/
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- export REPO=$DOCKER_USERNAME/phpinsights
- docker build -f docker/Dockerfile -t $REPO:$TRAVIS_TAG .
- docker tag $REPO:$TRAVIS_TAG $REPO:latest
- docker push $REPO:$TRAVIS_TAG
- docker push $REPO:latest