-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
70 lines (62 loc) · 2.14 KB
/
.appveyor.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
environment:
# Use this matrix as an example
matrix:
# Specify matrix item for your app
- PHP_VERSION: 8.0
VC_VERSION: 16
BUILD_TYPE: nts-Win32
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
PHP_AVM: https://raw.githubusercontent.com/MaxGoryunov/php-appveyor/master/php-appveyor.psm1
# Cache PHP and tooling
cache:
# The C:\Downloads directory will be used as a storage for downloaded archives.
# So you may want to cache it.
- 'C:\Downloads -> .appveyor.yml'
# Specify required architecture.
# Supported architectures are ``x86`` and ``x64``
platform:
- x64
install:
# Download php-appveyor.psm1 module and invoke it to the current session
- ps: (new-object Net.WebClient).DownloadString($Env:PHP_AVM) | iex
- ps: InstallPhp $Env:PHP_VERSION $Env:BUILD_TYPE $Env:VC_VERSION $Env:PLATFORM
- ps: InstallPhpDevPack $Env:PHP_VERSION $Env:BUILD_TYPE $Env:VC_VERSION $Env:PLATFORM
# An example to install PECL extension
- ps: >-
InstallPeclExtension `
-Name xdebug `
-Version 3.0.3 `
-PhpVersion $Env:PHP_VERSION `
-BuildType $Env:BUILD_TYPE `
-VC $Env:VC_VERSION `
-Platform $Env:PLATFORM
- ps: >-
EnableZendExtension `
-Name xdebug
- cinst composer -i -y
- SET XDEBUG_MODE=coverage
- cd %APPVEYOR_BUILD_FOLDER%
- SET COMPOSER_NO_INTERACTION=1
- SET COMPOSER_CACHE_DIR=%COMPOSER_CACHE%
- refreshenv
- composer update --no-progress
#build_script:
# Your code here
#--------------------------------
build: false
## Run the actual test
test_script:
# PHPUnit tests
- vendor\bin\phpunit --coverage-text --configuration phpunit.xml
# Coverage files
- ./vendor/bin/phpunit --coverage-clover=coverage.xml
# Coverage check
- vendor/bin/coverage-check coverage.xml 100 --only-percentage
# PHPStan analysis
- ./vendor/bin/phpstan analyse
# Infection analysis
- ./vendor/bin/infection --min-msi=90 --min-covered-msi=90 --threads=4 --configuration=./infection.json.dist
after_test:
- ps: |
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
- bash codecov.sh -f 'coverage.xml'