-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
67 lines (59 loc) · 2.37 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
language: php
services:
# 5.6.x by default
- mysql
php:
- 7.1.3
- 7.4
cache:
directories:
- $HOME/.composer/cache
before_install:
- mysql -e 'CREATE DATABASE doika;'
- nvm install 10
before_script:
# disable xdebug if not coverage
- if [[ $COVERAGE == "" ]]; then phpenv config-rm xdebug.ini; fi
- cp .env.ci .env
- composer install --no-progress --no-interaction --prefer-dist --no-suggest
- php artisan key:generate
- npm config set registry http://registry.npmjs.org/
- npm ci
- npm run prod
script:
- composer test:ci
- php artisan route:list
# - php artisan translations:missing
- php artisan migrate:fresh --seed
after_script:
- |
if [[ $COVERAGE == true && $TRAVIS_BRANCH == "master" ]]; then
vendor/bin/phpunit --coverage-clover coverage.xml
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
php php-coveralls.phar --verbose
fi
jobs:
include:
- # require a new git tag to create a zip ans upload it to github
if: tag IS present
stage: Release
env:
- BUILD=true
script:
- NAME="doika"
- zip -r $NAME ./ -x .git/\* -x .github/\* -x .env .env.docker -x .git* -x .travis.yml -x .editorconfig -x composer.* -x docker/\* -x node_modules/\* -x storage/\* -x tests/\*
- TAG=$(git describe --tags)
- FILE="./$NAME.zip"
- if [[ -e $FILE ]]; then
NEW_NAME="$NAME-$TAG.$TRAVIS_JOB_ID";
mv $NAME.zip $NEW_NAME.zip;
fi
deploy:
provider: releases
api_key:
secure: Lz6471uYFipVKYR7rk0AfMqb+ZRcTRUy3YnxFnMCJVg8mNQOzIpPf8/JW0yMVFxeVg74vZ8Bpd//sYd8333Gdd6KcYi1bpUXYBzXbwrVJ1ajm4MA3M/klPQJqOn884a6AYHlDpolkxTG47mcRZj7ycmhBV49ZZ6GIAkAfDE6/ZMzrofr2TVZzASCF+qcuNSQtZv326EWohtJLMewrs8qt4qvZL+4hfvgXGDBWRfzUyhC4tGrSpGZPk26kYSbsH49q+aq3+bdPZCxB6m1i3Y7e5JKCzVu3AMxq17LWCSfNX6/fV4XwACoLw5dMHin1XZLwyWw46kTaJ/izXiuuihId+hreHHyDwPzJle5qPcKyUVBB5xB4pKMwCbEKW7sA+rQQ0oGg4HvG3zSlD3XsB21hYKVgOvIiEXnh0APBJk6pGvAVNHFrzqOliQbTFPEzZ2LrgkVhRPl2Xs1AYwkABax3pJYXn+7b/T88oxLsIL9nvBnckyomZEwCjoYpvOTxw1gC9eD45BNDppschIMByEOAAaX3LqX8p2IRuQqjvJqQVF7ge0wYzB19dYZ9qGvsqjPoC6BS07VXqz5kZVmqUngM+8TrlLG9WmcpQTPeOYR/UiHli1m5cF4rcP6J4s6ZV5psDCUTVWL5dtArE8+l5TfjwVxCKF6S8I3UsrCf1nt67I=
file: "$NEW_NAME.zip"
skip_cleanup: true
on:
tags: true
repo: diglabby/doika