From de04bd0b19bf9d13e22be9b9938fbb1b7b900786 Mon Sep 17 00:00:00 2001 From: Yohan Giarelli Date: Thu, 9 Jan 2025 16:13:51 +0100 Subject: [PATCH] ci: migrate to github workflow (#67) --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ .travis.yml | 27 --------------------------- 2 files changed, 30 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..38474df --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + pull_request: + +jobs: + phpunit: + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] + dependencies-versions: [ lowest, highest ] + name: PHPUnit test suite + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + + - name: Install dependencies + uses: ramsey/composer-install@v3 + with: + dependency-versions: ${{ matrix.dependencies-versions }} + + - name: Run tests + run: vendor/bin/phpunit --coverage-text diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cf23181..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: php - -php: - - 7.4 - - 8.0 - - nightly - -matrix: - include: - - php: 7.4 - env: dependencies=lowest - - php: 8.0 - env: dependencies=lowest - -before_install: - - composer self-update - -install: - - travis_retry composer install --no-interaction --prefer-source - - if [ "$dependencies" = "lowest" ]; then rm -rf vendor; composer update --prefer-lowest --prefer-stable -n; fi; - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.clover - -after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover