Skip to content

Commit 4906e8c

Browse files
author
Todd Lair
committed
Set up CI with Azure Pipelines
[skip ci]
1 parent 36d6279 commit 4906e8c

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

azure-pipelines.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# PHP
2+
# Test and package your PHP project.
3+
# Add steps that run tests, save build artifacts, deploy, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/php
5+
6+
trigger:
7+
- master
8+
9+
pool:
10+
vmImage: ubuntu-latest
11+
12+
variables:
13+
phpVersion: 7.2
14+
15+
steps:
16+
- script: |
17+
sudo update-alternatives --set php /usr/bin/php$(phpVersion)
18+
sudo update-alternatives --set phar /usr/bin/phar$(phpVersion)
19+
sudo update-alternatives --set phpdbg /usr/bin/phpdbg$(phpVersion)
20+
sudo update-alternatives --set php-cgi /usr/bin/php-cgi$(phpVersion)
21+
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$(phpVersion)
22+
php -version
23+
displayName: 'Use PHP version $(phpVersion)'
24+
25+
- script: composer install --no-interaction --prefer-dist
26+
displayName: 'composer install'
27+
- task: CmdLine@2
28+
inputs:
29+
script: 'curl -sSL https://www.sourceclear.com/install | sh'
30+
- task: CmdLine@2
31+
inputs:
32+
script: 'srcclr scan .'
33+
env:
34+
SRCCLR_API_TOKEN: $(SRCCLR_API_TOKEN)

0 commit comments

Comments
 (0)