diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..87e2f79 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: push + +permissions: + contents: read + +jobs: + phpunit: + name: Run tests on ${{ matrix.php-version }} with ${{ matrix.dependency-versions }} dependencies + runs-on: ubuntu-latest + strategy: + matrix: + php-version: + - '7.1' + dependency-versions: + - 'lowest' + - 'highest' + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + + - name: Install dependencies + uses: ramsey/composer-install@v2 + with: + dependency-versions: ${{ matrix.dependency-versions }} + + - name: Run tests + run: composer test + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fc98db4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -language: php - -sudo: false - -env: - global: - - COMPOSER_NO_INTERACTION="1" - -matrix: - include: - - php: "7.1" - - php: "7.2" - - php: "7.3" - - php: "7.4" - - php: "8.0" - - - php: "7.1" - env: LOWER_CONSTRAINTS="true" - - php: "7.2" - env: LOWER_CONSTRAINTS="true" - - php: "7.3" - env: LOWER_CONSTRAINTS="true" - - php: "7.4" - env: LOWER_CONSTRAINTS="true" - - -cache: - directories: - - $HOME/.composer/cache - -install: - - IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")); unset IFS - -before_script: - - phpenv config-rm xdebug.ini || true - - if [[ "$LOWER_CONSTRAINTS" == "true" ]]; then bin/update-constraints-to-lowest.php; fi - - bash -c "composer update" - -script: - - bin/phpunit