diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..41863dd --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,37 @@ +name: "CI" + +on: + push: + branches: + - "main" + pull_request: null + +jobs: + tests: + runs-on: "ubuntu-latest" + name: "Test ${{ matrix.php }}" + strategy: + fail-fast: true + matrix: + php: + - "7.3" + - "7.4" + - "8.0" + - "8.1" + + steps: + - name: "Check out repository code" + uses: "actions/checkout@v2" + + - name: "Setup PHP" + uses: "shivammathur/setup-php@v2" + with: + php-version: "${{ matrix.php }}" + tools: "composer" + coverage: "pcov" + + - name: "Install Composer dependencies" + uses: "ramsey/composer-install@v2" + + - name: "Run tests" + run: "make" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 721e7cd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: php - -sudo: false - -cache: - directories: - - $HOME/.composer/cache/files - -env: - - COMPOSER_FLAGS='--no-interaction --no-progress --no-suggest --prefer-dist' - -matrix: - include: - - php: '7.3' - env: PREFER_LOWEST='--prefer-lowest' - - php: '7.4' - env: SYMFONY_VERSION='~4.4.0' - - php: '7.4' - env: SYMFONY_VERSION='~5.0.0' - - php: '8.0' - env: SYMFONY_VERSION='~5.0.0' - fast_finish: true - -before_install: - - phpenv config-rm xdebug.ini || true - - set -eo pipefail - - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - - composer validate --strict - - | - if [ -n "$SYMFONY_VERSION" ]; then - composer require --no-update "symfony/console:${SYMFONY_VERSION}" "symfony/dependency-injection:${SYMFONY_VERSION}" "symfony/process:${SYMFONY_VERSION}" "symfony/framework-bundle:${SYMFONY_VERSION}"; - fi - -install: - - composer update $COMPOSER_FLAGS $PREFER_LOWEST - -script: - - make test - -notifications: - email: false