From 70be8dbe4c1114880a7c9c6a6ecf74fb468b2cc0 Mon Sep 17 00:00:00 2001 From: Jan Langer Date: Fri, 14 Feb 2020 18:02:35 +0100 Subject: [PATCH] Travis with windows build, removed broken appveyor --- .gitattributes | 1 - .travis.yml | 166 +++++++++++++++++++++++++++++++++++++++++++------ appveyor.yml | 64 ------------------- readme.md | 1 - 4 files changed, 147 insertions(+), 85 deletions(-) delete mode 100644 appveyor.yml diff --git a/.gitattributes b/.gitattributes index 0c5aaa4..342564d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,5 @@ .gitattributes export-ignore .gitignore export-ignore -/appveyor.yml export-ignore /.travis.yml export-ignore /.scrutinizer.yml export-ignore /build export-ignore diff --git a/.travis.yml b/.travis.yml index 4eaaf8e..4a3db1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,154 @@ +os: linux +dist: xenial language: php -php: - - 7.2 - - 7.3 - - 7.4snapshot +git: + depth: 1 -env: - - # default environment without variables - - COMPOSER_DEPENDENCIES_OPTIONS="--prefer-lowest --prefer-stable" +before_script: + - if [ "${DEPENDENCIES}" = "lowest" ]; then travis_retry composer update --prefer-lowest --prefer-dist --no-interaction --no-progress; fi; + - if [ "${DEPENDENCIES}" = "highest" ]; then travis_retry composer update --no-interaction --no-progress; fi; -matrix: - fast_finish: true - allow_failures: - - php: nightly +jobs: + include: + - stage: Lint + php: 7.2 + env: DEPENDENCIES=highest + script: vendor/bin/phing check-phplint -before_script: - - composer self-update + - stage: Lint + php: 7.3 + env: DEPENDENCIES=highest + script: vendor/bin/phing check-phplint + + - stage: Lint + php: 7.4 + env: DEPENDENCIES=highest + script: vendor/bin/phing check-phplint + + - stage: Tests + php: 7.2 + env: DEPENDENCIES=lowest + script: vendor/bin/phing check-tests + + - stage: Tests + php: 7.2 + env: DEPENDENCIES=highest + script: vendor/bin/phing check-tests + + - stage: Tests + os: windows + dist: 1803-containers + language: sh # No PHP currently + env: PHP_VERSION=7.2.23 DEPENDENCIES=lowest + install: + - choco install php --version=${PHP_VERSION} --package-parameters="/InstallDir:c:\tools\php" + - choco install composer --ia "/DEV=C:\tools\php" + - echo "extension=soap" >> /c/tools/php/php.ini + - export PATH=/c/tools/php:$PATH + script: vendor/bin/phing check-tests + + - stage: Tests + os: windows + dist: 1803-containers + language: sh # No PHP currently + env: PHP_VERSION=7.2.23 DEPENDENCIES=highest + install: + - choco install php --version=${PHP_VERSION} --package-parameters="/InstallDir:c:\tools\php" + - choco install composer --ia "/DEV=C:\tools\php" + - echo "extension=soap" >> /c/tools/php/php.ini + - export PATH=/c/tools/php:$PATH + script: vendor/bin/phing check-tests + + - stage: Tests + php: 7.3 + env: DEPENDENCIES=lowest + script: vendor/bin/phing check-tests + + - stage: Tests + php: 7.3 + env: DEPENDENCIES=highest + script: vendor/bin/phing check-tests + + - stage: Tests + os: windows + dist: 1803-containers + language: sh # No PHP currently + env: PHP_VERSION=7.3.10 DEPENDENCIES=lowest + install: + - choco install php --version=${PHP_VERSION} --package-parameters="/InstallDir:c:\tools\php" + - choco install composer --ia "/DEV=C:\tools\php" + - echo "extension=soap" >> /c/tools/php/php.ini + - export PATH=/c/tools/php:$PATH + script: vendor/bin/phing check-tests + + - stage: Tests + os: windows + dist: 1803-containers + language: sh # No PHP currently + env: PHP_VERSION=7.3.10 DEPENDENCIES=highest + install: + - choco install php --version=${PHP_VERSION} --package-parameters="/InstallDir:c:\tools\php" + - choco install composer --ia "/DEV=C:\tools\php" + - echo "extension=soap" >> /c/tools/php/php.ini + - export PATH=/c/tools/php:$PATH + script: vendor/bin/phing check-tests + - stage: Tests + os: windows + dist: 1803-containers + language: sh # No PHP currently + env: PHP_VERSION=7.4.2 DEPENDENCIES=lowest + install: + - choco install php --version=${PHP_VERSION} --package-parameters="/InstallDir:c:\tools\php" + - choco install composer --ia "/DEV=C:\tools\php" + - echo "extension=soap" >> /c/tools/php/php.ini + - export PATH=/c/tools/php:$PATH + script: vendor/bin/phing check-tests + + - stage: Tests + os: windows + dist: 1803-containers + language: sh # No PHP currently + env: PHP_VERSION=7.4.2 DEPENDENCIES=highest + install: + - choco install php --version=${PHP_VERSION} --package-parameters="/InstallDir:c:\tools\php" + - choco install composer --ia "/DEV=C:\tools\php" + - echo "extension=soap" >> /c/tools/php/php.ini + - export PATH=/c/tools/php:$PATH + script: vendor/bin/phing check-tests + + - stage: Tests + php: 7.4 + env: DEPENDENCIES=lowest + script: vendor/bin/phing check-tests + + - stage: Tests + php: 7.4 + env: DEPENDENCIES=highest + script: vendor/bin/phing check-tests + + - stage: Coding standard + php: 7.4 + env: DEPENDENCIES=highest + script: vendor/bin/phing check-phpcs + + - stage: Static analysis + php: 7.4 + env: DEPENDENCIES=highest + script: vendor/bin/phing check-phpstan + + - stage: Code coverage + php: 7.4 + env: DEPENDENCIES=highest + install: + - wget https://scrutinizer-ci.com/ocular.phar; + script: + - vendor/bin/phing check-tests + - php ocular.phar code-coverage:upload --format=php-clover build/log/clover.xml -script: - - composer update --no-interaction --prefer-source $COMPOSER_DEPENDENCIES_OPTIONS - - vendor/bin/phing +cache: + directories: + - $HOME/.composer/cache -after_script: - - if [[ $TRAVIS_PHP_VERSION = '7.2' && $COMPOSER_DEPENDENCIES_OPTIONS = '' ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi - - if [[ $TRAVIS_PHP_VERSION = '7.2' && $COMPOSER_DEPENDENCIES_OPTIONS = '' ]]; then php ocular.phar code-coverage:upload --format=php-clover build/log/clover.xml; fi +notifications: + email: false diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index ca0d46b..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,64 +0,0 @@ -build: false -clone_folder: c:\projects\slevomat-eet-client -clone_depth: 50 -platform: -- x64 -environment: - matrix: - - dependencies: lowest - php_version: 7.2 - - dependencies: highest - php_version: 7.2 - - dependencies: lowest - php_version: 7.3 - - dependencies: highest - php_version: 7.3 - - project_directory: c:\projects\slevomat-eet-client - composer_directory: c:\tools\composer - composer_executable: c:\tools\composer\composer.phar - composer_installer: c:\tools\composer\installer.php - php_root_directory: c:\tools\php -cache: -- c:\ProgramData\chocolatey\bin -> appveyor.yml -- c:\ProgramData\chocolatey\lib -> appveyor.yml -- c:\tools\composer -> appveyor.yml -- '%LOCALAPPDATA%\Composer -> appveyor.yml' -- c:\tools\php -> appveyor.yml -init: -- ps: $Env:php_directory = $Env:php_root_directory + '\' + $Env:php_version -- ps: $Env:exact_php_version = (((choco search php --exact --all-versions --limit-output | Select-String -pattern $Env:php_version) -replace '[php|]', '') | %{ New-Object System.Version $_ } | Sort-Object | Select-Object -Last 1).ToString() -- ps: $Env:PATH = $Env:php_directory + ';' + $Env:composer_directory + ';' + $Env:PATH -- ps: $Env:COMPOSER_NO_INTERACTION = 1 -- ps: $Env:ANSICON = '121x90 (121x90)' -install: -# Install PHP -- ps: If ((Test-Path $Env:php_directory) -eq $False) { New-Item -Path $Env:php_directory -ItemType 'directory' } -- ps: $php_install_parameters = '"/DontAddToPath /InstallDir:' + $Env:php_directory + '"' -- ps: appveyor-retry choco upgrade php --yes --version=$Env:exact_php_version --params=$php_install_parameters - -# Prepare PHP -- ps: cd $Env:php_directory -- ps: Copy-Item php.ini-production -Destination php.ini -- ps: Add-Content -Path php.ini -Value 'date.timezone="UTC"' -- ps: Add-Content -Path php.ini -Value 'extension_dir=ext' -- ps: Add-Content -Path php.ini -Value 'extension=php_curl.dll' -- ps: Add-Content -Path php.ini -Value 'extension=php_openssl.dll' -- ps: Add-Content -Path php.ini -Value 'extension=php_mbstring.dll' -- ps: Add-Content -Path php.ini -Value 'extension=php_soap.dll' -- ps: php --version - -# Prepare composer -- ps: If ((Test-Path $Env:composer_directory) -eq $False) { New-Item -Path $Env:composer_directory -ItemType 'directory' } -- ps: If ((Test-Path $Env:composer_installer) -eq $False) { appveyor-retry appveyor DownloadFile https://getcomposer.org/installer -FileName $Env:composer_installer } -- ps: If ((Test-Path $Env:composer_executable) -eq $False) { php $Env:composer_installer --install-dir=$Env:composer_directory } -- ps: Set-Content -Path ($Env:composer_directory + '\composer.bat') -Value ('@php ' + $Env:composer_executable + ' %*') -- composer self-update - -# Install dependencies -- ps: cd $Env:project_directory -- IF %dependencies%==lowest composer update --prefer-dist --prefer-lowest --prefer-stable --no-progress -- IF %dependencies%==highest composer update --prefer-dist --no-progress -test_script: -- ps: cd $Env:project_directory -- vendor\bin\phing diff --git a/readme.md b/readme.md index 721db38..22c9ba0 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,6 @@ # Client for EET - Elektronická evidence tržeb [![Build Status](https://img.shields.io/travis/slevomat/eet-client/master.svg?style=flat-square)](https://travis-ci.org/slevomat/eet-client) -[![Build status](https://img.shields.io/appveyor/ci/slevomat/eet-client/master.svg?style=flat-square)](https://ci.appveyor.com/project/slevomat/eet-client/branch/master) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/slevomat/eet-client.svg?style=flat-square)](https://scrutinizer-ci.com/g/slevomat/eet-client/?branch=master) [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/slevomat/eet-client.svg?style=flat-square)](https://scrutinizer-ci.com/g/slevomat/eet-client/?branch=master) [![Latest Stable Version](https://img.shields.io/packagist/v/slevomat/eet-client.svg?style=flat-square)](https://packagist.org/packages/slevomat/eet-client)