-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
57 lines (48 loc) · 1.63 KB
/
azure-pipelines.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
trigger:
branches:
include:
- '*'
tags:
include:
- '*'
strategy:
matrix:
php81:
php_version: 8.1
php82:
php_version: 8.2
pool:
vmImage: ubuntu-latest
variables:
- group: mrd-auth0-laravel
steps:
- script: |
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php$(php_version)
sudo apt-get install php$(php_version)-cli php$(php_version)-mbstring php$(php_version)-xml php$(php_version)-curl
sudo apt-get install php$(php_version)-dom php$(php_version)-simplexml php$(php_version)-xdebug
sudo update-alternatives --set php /usr/bin/php$(php_version)
sudo update-alternatives --set phar /usr/bin/phar$(php_version)
sudo update-alternatives --set phpdbg /usr/bin/phpdbg$(php_version)
sudo update-alternatives --set php-cgi /usr/bin/php-cgi$(php_version)
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$(php_version)
php -version
displayName: 'Use PHP version $(php_version)'
- script: composer install --no-interaction --prefer-dist
displayName: 'composer install'
- script: composer analyze
displayName: 'Analyze code'
- script: composer test-coverage
displayName: 'Run tests'
- task: PublishTestResults@2
condition: always()
displayName: 'Publish test report'
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'test_reports/report.xml'
- script: bash <(curl -s https://codecov.io/bash) -t $(codecov_token)
condition: always()
displayName: 'Upload to codecov.io'