diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 00000000..a99cd048 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,32 @@ +name: Static Analysis + +on: ['push', 'pull_request'] + +jobs: + ci: + runs-on: ubuntu-latest + strategy: + matrix: + php: ['7.2', '7.3', '7.4', '8.0'] + name: Code Style + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: composer:v2 + ini-values: pcov.directory=api #optional, see above for usage. + coverage: pcov + + - name: Install Dependencies + run: composer update --no-interaction --no-progress + + - name: Run PHPCS + run: composer run cs + + - name: Run PHPStan + run: composer run static \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..26d9a43e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,36 @@ +name: Tests + +on: ['push', 'pull_request'] + +jobs: + ci: + runs-on: ubuntu-latest + strategy: + matrix: + php: ['7.2', '7.3', '7.4', '8.0'] + + name: PHP ${{ matrix.php }} + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: composer:v2 + coverage: xdebug + + - name: Setup Problem Matches + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Install PHP 7 dependencies + run: composer update --no-interaction --no-progress + + - name: Tests + run: TERM=xterm-256color ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml + + - uses: codecov/codecov-action@v1 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 93acfdcf..00000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: php - -cache: - directories: - - $HOME/.composer/cache/files - -matrix: - include: - - php: 7.2 - - php: 7.3 - - php: 7.4 - - php: nightly - -install: - - composer self-update - - composer install --prefer-dist $COMPOSER_FLAGS - -before_script: - - mkdir -p build/logs - -script: - - ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml - - composer cs - - composer static - -after_script: - - bash <(curl -s https://codecov.io/bash) - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index fde0fb70..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,28 +0,0 @@ -build: false -platform: 'x86' -clone_folder: C:\projects\cli-menu -branches: - except: - - gh-pages - -init: - - SET COMPOSER_NO_INTERACTION=1 - -install: - - SET PATH=C:\Program Files\OpenSSL;%PATH% - - cinst php - - cd c:\tools\php - - copy php.ini-production php.ini - - echo date.timezone="UTC" >> php.ini - - echo extension_dir=ext >> php.ini - - echo extension=php_openssl.dll >> php.ini - - echo extension=php_mbstring.dll >> php.ini - - SET PATH=C:\tools\php;%PATH% - - cd C:\projects\cli-menu - - php -r "readfile('http://getcomposer.org/installer');" | php - - php composer.phar install --prefer-source --no-progress - -test_script: - - ps: cd C:\projects\cli-menu - - ps: gl - - vendor\bin\phpunit.bat