mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
jobs:
|
|
- job: php
|
|
displayName: PHP Test
|
|
pool:
|
|
vmImage: 'Ubuntu-16.04'
|
|
strategy:
|
|
matrix:
|
|
php71:
|
|
phpVersion: 7.1
|
|
php72:
|
|
phpVersion: 7.2
|
|
variables:
|
|
APP_ENV: testing
|
|
DB_CONNECTION: mysql
|
|
DB_DATABASE: test
|
|
DB_USERNAME: root
|
|
DB_PASSWORD: root
|
|
|
|
steps:
|
|
- script: |
|
|
sudo update-alternatives --set php /usr/bin/php$(phpVersion)
|
|
sudo update-alternatives --set phar /usr/bin/phar$(phpVersion)
|
|
sudo update-alternatives --set phpdbg /usr/bin/phpdbg$(phpVersion)
|
|
sudo update-alternatives --set php-cgi /usr/bin/php-cgi$(phpVersion)
|
|
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$(phpVersion)
|
|
php -version
|
|
displayName: 'Use PHP version $(phpVersion)'
|
|
|
|
- script: composer install --no-interaction --prefer-dist
|
|
displayName: 'composer install'
|
|
|
|
- script: |
|
|
cp .env.testing .env
|
|
php artisan key:random
|
|
php artisan salt:random
|
|
mysql -uroot -proot -e 'CREATE DATABASE IF NOT EXISTS test;'
|
|
displayName: 'Prepare testing environment'
|
|
|
|
- script: ./vendor/bin/phpunit
|
|
displayName: Test
|
|
|
|
- job: javascript
|
|
displayName: JavaScript and Vue Test
|
|
pool:
|
|
vmImage: 'Ubuntu-16.04'
|
|
steps:
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: 10
|
|
|
|
- script: yarn
|
|
displayName: Install dependencies
|
|
|
|
- script: |
|
|
yarn lint
|
|
yarn test --verbose --coverage
|
|
displayName: 'Run Test'
|