diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0065836 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: MO4 Coding Standard CI +on: + pull_request: + push: +jobs: + run-tests: + strategy: + matrix: + php_version: + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - 7.3 + - 7.4 + - 8.0 + - 8.1 + - 8.2 + - 8.3 + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php_version }} + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: '~/.cache/composer' + key: "cache-composer-${{ hashFiles('composer.json') }}" + restore-keys: 'cache-composer-' + - name: Run composer + run: composer update --prefer-dist --no-interaction --no-progress + - name: Run tests + run: ant test -Dcomposer.path=composer diff --git a/.gitignore b/.gitignore index 26e3e1c..c0a08fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ cache.properties phpunit.xml +.phpunit.result.cache composer.lock composer.phar vendor/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 493c273..0000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -language: php - -php: - - 5.6 # security support until 31/12/2018 - - 7.0 # security support until 03/12/2018 - - 7.1 # security support until 01/12/2019 - - 7.2 # security support until 30/11/2020 - - 7.3 # security support until 06/12/2021 - - 7.4 # security support until 28/11/2022 - - 8.0 # security support until 26/11/2023 - - nightly - -addons: - apt: - packages: - ant - -before_script: - - stable='^[0-9\.]+$'; if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then phpenv config-rm xdebug.ini; fi - - export PATH="$HOME/.composer/vendor/bin:$PATH" - # PHPUnit 8.x is not (yet) supported, so prevent issues with Travis images using it. - - | - if [[ $TRAVIS_PHP_VERSION == "nightly" || $TRAVIS_PHP_VERSION == "8.0" ]]; then - travis_retry composer install --ignore-platform-reqs - else - travis_retry composer install - fi - -script: - - ant test -Dcomposer.path=composer - -matrix: - allow_failures: - - php: nightly - -notifications: - email: - - development@davidjoos.com diff --git a/composer.json b/composer.json index 3b44c5d..7a24769 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "squizlabs/php_codesniffer": "^3.3.1" }, "require-dev": { - "phpunit/phpunit": "^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "conflict": { "squizlabs/php_codesniffer": "<3 || >=4"