forked from alefesouza/laravel-vue-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vsts-ci.yml
202 lines (159 loc) · 5.55 KB
/
.vsts-ci.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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
phases:
- phase: test_on_windows
displayName: Test on Windows
queue: Hosted
steps:
- task: NodeTool@0
displayName: Use Node.js 8
inputs:
versionSpec: 8
- powershell: |
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
scoop bucket add versions
scoop install php70 yarn
echo extension=php_pdo_sqlite.dll | Add-Content $env:PHPIni
echo extension=php_intl.dll | Add-Content $env:PHPIni
echo extension=php_openssl.dll | Add-Content $env:PHPIni
echo extension=php_mbstring.dll | Add-Content $env:PHPIni
$env:PATH += ";C:\Users\buildguest\scoop\apps\php70\current"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
displayName: Install PHP, Composer and Yarn
env:
PHPIni: C:\Users\buildguest\scoop\apps\php70\current\php.ini
- powershell: |
# PATH variable was redefined when I tested...
$env:PATH += ";$env:PHP"
Copy-Item .env.vsts-ci .env
Copy-Item .env.vsts-ci .env.testing -Force
php composer.phar install -n --prefer-dist
php composer.phar run key:generate
php composer.phar run jwt:generate
php artisan vue-i18n:generate
New-Item database\database.sqlite -type file
php artisan migrate --seed
displayName: Run Composer
env:
PHP: C:\Users\buildguest\scoop\apps\php70\current
- powershell: |
$env:PATH += ";$env:YARN"
yarn --pure-lockfile
yarn production
displayName: Run Yarn
env:
YARN: C:\Users\buildguest\scoop\apps\yarn\current\Yarn\bin
- powershell: |
$env:PATH += ";$env:PHP;$env:YARN"
php composer.phar test -- --log-junit tests-phpunit.xml
php phpunit-log-junit-fix.php tests-phpunit.xml
yarn test
displayName: Test
env:
PHP: C:\Users\buildguest\scoop\apps\php70\current
YARN: C:\Users\buildguest\scoop\apps\yarn\current\Yarn\bin
- task: PublishTestResults@2
displayName: Publish PHPUnit Tests
inputs:
testRunner: JUnit
testResultsFiles: tests-phpunit.xml
testRunTitle: PHPUnit Tests
- task: PublishTestResults@2
displayName: Publish Jest Tests
inputs:
testRunner: JUnit
testResultsFiles: tests-jest.xml
testRunTitle: Jest Tests
- phase: test_on_linux
displayName: Test on Linux
queue: Hosted Linux Preview
steps:
- task: NodeTool@0
displayName: Use Node.js 8
inputs:
versionSpec: 8
- script: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo add-apt-repository ppa:ondrej/php-$PHPVersion
sudo apt-get update
sudo apt-get -y --allow-unauthenticated install php$PHPVersion php$PHPVersion-mbstring php$PHPVersion-sqlite php$PHPVersion-intl php$PHPVersion-dom yarn
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
displayName: Install PHP, Composer and Yarn
env:
PHPVersion: 7.0
- script: |
cp .env.vsts-ci .env
cp .env.vsts-ci .env.testing
composer install -n --prefer-dist
composer run key:generate
composer run jwt:generate
php artisan vue-i18n:generate
touch ./database/database.sqlite
php artisan migrate --seed
displayName: Run Composer
- script: |
yarn --pure-lockfile
yarn production
displayName: Run Yarn
- script: |
composer test -- --log-junit tests-phpunit.xml
php phpunit-log-junit-fix.php tests-phpunit.xml
yarn test
displayName: Test
- task: PublishTestResults@2
displayName: Publish PHPUnit Tests
inputs:
testRunner: JUnit
testResultsFiles: tests-phpunit.xml
testRunTitle: PHPUnit Tests
- task: PublishTestResults@2
displayName: Publish Jest Tests
inputs:
testRunner: JUnit
testResultsFiles: tests-jest.xml
testRunTitle: Jest Tests
- phase: test_on_mac
displayName: Test on macOS
queue: Hosted macOS Preview
steps:
- task: NodeTool@0
displayName: Use Node.js 8
inputs:
versionSpec: 8
- script: |
brew tap homebrew/php
brew install php$PHPVersion php$PHPVersion-intl composer yarn
displayName: Install PHP, Composer and Yarn
env:
PHPVersion: 70
- script: |
cp .env.vsts-ci .env
cp .env.vsts-ci .env.testing
composer install -n --prefer-dist
composer run key:generate
composer run jwt:generate
php artisan vue-i18n:generate
touch ./database/database.sqlite
php artisan migrate --seed
displayName: Run Composer
- script: |
yarn --pure-lockfile
yarn production
displayName: Run Yarn
- script: |
composer test -- --log-junit tests-phpunit.xml
php phpunit-log-junit-fix.php tests-phpunit.xml
yarn test
displayName: Test
- task: PublishTestResults@2
displayName: Publish PHPUnit Tests
inputs:
testRunner: JUnit
testResultsFiles: tests-phpunit.xml
testRunTitle: PHPUnit Tests
- task: PublishTestResults@2
displayName: Publish Jest Tests
inputs:
testRunner: JUnit
testResultsFiles: tests-jest.xml
testRunTitle: Jest Tests