-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
91 lines (77 loc) · 2.14 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
# TravisCI configuration for username/projectname
# Larawelders don't ride the hype train: We use Travis CI.
language: "php"
os:
- "linux"
dist: "bionic"
stages:
- "commits"
- "test"
php:
- "7.4"
- "7.3"
- "8.0snapshot"
env:
jobs:
- LARAVERSION: "8.0"
- LARAVERSION: "7.0"
- LARAVERSION: "6.0"
cache:
directories:
- "${HOME}/.composer/cache"
jobs:
include:
- stage: "commits"
name: "Check committers have a GitHub account"
before_install: "skip"
install: "skip"
before_script: "skip"
script:
- |
Check_author()
{
local author="$1"
local github_api_url="https://api.github.com/search/users"
echo "Checking ${author} ..."
curl -s -G --data-urlencode "q=type:user in:email ${author}" "${github_api_url}" \
| grep -F -x ' "total_count": 1,'
}
git show --no-patch --pretty="format:%ae" "${TRAVIS_COMMIT_RANGE}" \
| sort -u \
| while read -r author; do Check_author "${author}"; done
after_script: "skip"
- stage: "commits"
name: "Check file execution bits"
before_install: "skip"
install: "skip"
before_script: "skip"
script:
# No file should be executable
- |
test -z "$(find . -type f -not -path "./.git/*" -executable)"
after_script: "skip"
- stage: "test"
php: "7.2"
env:
install: |
composer update --with="laravel/laravel:^7.0" --with="phpunit/phpunit:^8.0"
script: "composer run-script test -- --configuration phpunit8.xml"
- stage: "test"
php: "7.2"
env:
install: |
composer update --with="laravel/laravel:^6.0" --with="phpunit/phpunit:^8.0"
script: "composer run-script test -- --configuration phpunit8.xml"
exclude:
- php: "8.0snapshot"
env: "LARAVERSION=7.0"
- php: "8.0snapshot"
env: "LARAVERSION=6.0"
before_install:
- "phpenv config-rm xdebug.ini"
- "composer validate --strict"
install:
- |
composer update --with="laravel/laravel:^${LARAVERSION}"
script:
- "composer run-script test"