forked from phpvms/phpvms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
160 lines (147 loc) · 3.66 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#
# Travis CI config file
#
language: php
php:
- '7.4'
- '7.3'
#env:
# - DB=mysql
# - DB=mariadb
cache:
# Cache lives for 10 min
# Default of 3m might not be long enough for all the runs
timeout: 600
directories:
- "$HOME/.composer/cache"
- "$HOME/.npm"
services:
- mysql
#addons:
# mariadb: '10.2'
install:
- php --version
- mysql --version
- composer install --dev --no-interaction --verbose
- npm i tar-to-zip -g
- cp .travis/env.travis.php env.php
- cp .travis/phpunit.travis.xml phpunit.xml
before_script:
- php artisan database:create --reset
- php artisan migrate:refresh --seed
script:
- vendor/bin/php-cs-fixer fix --config=.php_cs -v --dry-run --diff --using-cache=no
- vendor/bin/phpunit --debug --verbose
after_failure:
- cat storage/logs/*.log
# Refer to: https://github.com/doctrine/dbal/blob/master/.travis.yml#L39
jobs:
include:
# Different test stages
# - stage: Test
# name: PHP 7.2 + MySQL 5.7
# php: 7.2
# env: DB=mysql
# services:
# - mysql
# - stage: Test
# name: PHP 7.3 + MySQL 5.7
# php: 7.3
# env: DB=mysql
# services:
# - mysql
# - stage: Test
# name: PHP 7.4 + MySQL 5.7
# php: 7.4
# env: DB=mysql
# services:
# - mysql
# - stage: Test
# name: PHP 7.2 + MariaDB 10.1
# php: 7.2
# env: DB=mariadb
# addons:
# mariadb: '10.1'
# - stage: Test
# name: PHP 7.3 + MariaDB 10.1
# php: 7.3
# env: DB=mariadb
# addons:
# mariadb: '10.1'
# - stage: Test
# name: PHP 7.4 + MariaDB 10.1
# php: 7.4
# env: DB=mariadb MARIADB_VERSION=10.1
# addons:
# mariadb: '10.1'
# - stage: Test
# name: PHP 7.2 + MariaDB 10.2
# php: 7.2
# env: DB=mariadb
# addons:
# mariadb: '10.2'
# - stage: Test
# name: PHP 7.3 + MariaDB 10.3
# php: 7.3
# env: DB=mariadb
# addons:
# mariadb: '10.2'
# - stage: Test
# name: PHP 7.4 + MariaDB 10.2
# php: 7.4
# env: DB=mariadb
# addons:
# mariadb: '10.2'
# - stage: Test
# name: PHP 7.2 + MariaDB 10.3
# php: 7.2
# env: DB=mariadb
# addons:
# mariadb: '10.3'
# - stage: Test
# name: PHP 7.3 + MariaDB 10.3
# php: 7.3
# env: DB=mariadb
# addons:
# mariadb: '10.3'
# - stage: Test
# name: PHP 7.4 + MariaDB 10.3
# php: 7.4
# env: DB=mariadb
# addons:
# mariadb: '10.3'
# Just packages up a release
- stage: package
script: skip
before_deploy:
- curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/6b10798/install | bash
# Configure the conditional deployment
# https://docs.travis-ci.com/user/deployment/#examples-of-conditional-deployment
deploy:
- provider: script
skip_cleanup: true
script: ./.travis/deploy_script.sh
on:
all_branches: true
repo: nabeelio/phpvms
php: '7.4'
tags: false
# RELEASE STAGE
# Only runs when there's a tag applied to this release (tag should be the version)
# This uses Github Releases and posts it there (provider: releases)
# https://docs.travis-ci.com/user/deployment/releases
- stage: release
script: skip
before_deploy:
- curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/6b10798/install | bash
- ./.travis/deploy_script.sh
deploy:
provider: releases
skip_cleanup: true
api_key: $GITHUB_TOKEN
file_glob: true
file: build/*
on:
tags: true
repo: nabeelio/phpvms
php: '7.4'