From 4c603a010d2a1e59b69bd86ee1933853f26fdabf Mon Sep 17 00:00:00 2001 From: Yuri Gaidoba Date: Thu, 16 Nov 2023 10:52:27 +0100 Subject: [PATCH] SUPPORT-87332 - added GitHub workflow --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 40 ---------------------------------------- 2 files changed, 40 insertions(+), 40 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..8ba54eb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +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' + - '7.2' + - '7.3' + - '7.4' + - '8.0' + - '8.1' + - '8.2' + 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: ./bin/phpunit 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