diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..2257a559 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,34 @@ +name: Lint + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + phpcs: + runs-on: ubuntu-16.04 + strategy: + matrix: + php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] + steps: + - uses: actions/checkout@v2 + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: phpcs + - run: phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p + + phpcompatibility: + runs-on: ubuntu-16.04 + strategy: + matrix: + php-versions: ['5.6', '7.4'] + steps: + - uses: actions/checkout@v2 + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: phpcs + - run: phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..29ca71c0 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,47 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + phpunit6: + runs-on: ubuntu-16.04 + strategy: + matrix: + php-versions: ['7.0', '7.1', '7.2'] + steps: + - uses: actions/checkout@v2 + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + - run: composer global require phpunit/phpunit ^6 + - run: phpunit --configuration=phpunit.xml --include-path=lib/ + + phpunit7: + runs-on: ubuntu-16.04 + strategy: + matrix: + php-versions: ['7.1', '7.2', '7.3'] + steps: + - uses: actions/checkout@v2 + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + - run: composer global require phpunit/phpunit ^7 + - run: phpunit --configuration=phpunit.xml --include-path=lib/ + + phpunit8: + runs-on: ubuntu-16.04 + strategy: + matrix: + php-versions: ['7.3', '7.4'] + steps: + - uses: actions/checkout@v2 + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + - run: composer global require phpunit/phpunit ^8 + - run: phpunit --configuration=phpunit.xml --include-path=lib/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 841ac5db..00000000 --- a/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -dist: trusty -language: php - -install: - - composer global require dealerdirect/phpcodesniffer-composer-installer; - - composer global require phpcompatibility/php-compatibility; - - if [[ "$PHPUNIT" ]]; then - composer global require phpunit/phpunit ^$PHPUNIT; - fi - -script: - - phpenv rehash - # Run PHP_CodeSniffer on all versions - - ~/.config/composer/vendor/bin/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p; - # Check PHP compatibility for the lowest and highest supported version - - if [[ $TRAVIS_PHP_VERSION == "5.6" || $TRAVIS_PHP_VERSION == "7.3" ]]; then - ~/.config/composer/vendor/bin/phpcs . --standard=phpcompatibility.xml --extensions=php -p; - fi - # Run unit tests on highest major version - - if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]]; then - ~/.config/composer/vendor/bin/phpunit --configuration=phpunit.xml --include-path=lib/; - fi - -php: - - 7.3 - -env: - - PHPUNIT=6 - - PHPUNIT=7 - - PHPUNIT=8 - -matrix: - fast_finish: true - - include: - - php: 5.6 - env: PHPUNIT= - - php: 7.0 - - php: 7.1 - - php: 7.2 - - allow_failures: - - php: 7.3 - env: PHPUNIT=7 - - php: 7.3 - env: PHPUNIT=8