-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (47 loc) · 1.67 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
os:
- linux
language: php
php:
- 7.3
- 7.4
addons:
mariadb: '10.2'
chrome: stable
before_install:
- mysql -e 'create database IF NOT EXISTS ukauth;' -uroot
- cp .env.travis .env
- sudo apt-get update
- composer self-update
- nvm install 12.16.1
install:
- travis_retry composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader
- yarn install
- php artisan dusk:chrome-driver
- php artisan key:generate
- php artisan migrate -vvv -n
- php artisan db:seed
- php artisan passport:keys
- php artisan passport:client --client --name="VATSIM UK ClientCredentials Client"
# If this is not a PR and we are not running on master, run yarn as dev to improve performance
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" != "master" ]; then
yarn run dev;
else
yarn run prod;
fi
before_script:
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; fi
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
chmod +x ./cc-test-reporter;
fi
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
./cc-test-reporter before-build;
fi
- sed -i 's%^VATSIM_SSO_CERTIFCATE.*$%VATSIM_SSO_CERTIFCATE=\"${SSO_CERT}\"%' .env
- sed -i "s%^VATSIM_SSO_KEY.*$%VATSIM_SSO_KEY=${SSO_KEY}%" .env
- sed -i "s%^VATSIM_SSO_SECRET.*$%VATSIM_SSO_SECRET=${SSO_SECRET}%" .env
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
- php artisan serve &
script:
- vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
- yarn run test
- php artisan dusk