diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fda8b6d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + +jobs: + tests: + name: PHP ${{ matrix.php }} + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || false }} + strategy: + fail-fast: false + matrix: + include: + - php: "5.3" + - php: "5.4" + - php: "5.5" + - php: "5.6" + - php: "7.0" + - php: "7.1" + - php: "7.2" + - php: "7.3" + - php: "7.4" + - php: "8.0" + - php: "8.1" + - php: "8.2" + + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: mbstring + coverage: none + + - name: Cache Composer packages + uses: actions/cache@v5 + with: + path: ~/.cache/composer + key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('composer.json') }} + restore-keys: | + composer-${{ runner.os }}-${{ matrix.php }}- + composer-${{ runner.os }}- + + - name: Install dependencies + env: + COMPOSER_ADDITIONAL_FLAGS: ${{ matrix.composer_additional_flags }} + run: | + test -f composer.lock && rm composer.lock || true + ./composer update --ansi --prefer-dist --no-interaction --optimize-autoloader --no-progress ${COMPOSER_ADDITIONAL_FLAGS} + + - name: Run tests + run: ./vendor/bin/phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index aeff238..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -os: linux -language: php -dist: xenial -cache: - directories: - - $HOME/.composer/cache -php: - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - 7.4 - - 8.0 - - 8.1 - -jobs: - include: - - php: 5.3 - dist: precise - - php: 5.4 - dist: trusty - - php: 5.5 - dist: trusty - - php: 8.2 - dist: focal - addons: - apt: - packages: - - libonig5 - - php: nightly - env: COMPOSER_ADDITIONAL_FLAGS=--ignore-platform-reqs - fast_finish: true - allow_failures: - - php: nightly - - php: 5.3 -install: - - test -f composer.lock && rm composer.lock || true - - ./composer update --ansi --prefer-dist --no-interaction --optimize-autoloader --no-suggest --no-progress $COMPOSER_ADDITIONAL_FLAGS -script: - - ./vendor/bin/phpunit diff --git a/README.md b/README.md index 231e430..c648044 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Composer Wrapper -[![Build Status](https://travis-ci.org/kamazee/composer-wrapper.svg?branch=master)](https://travis-ci.org/kamazee/composer-wrapper) +[![CI](https://github.com/kamazee/composer-wrapper/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/kamazee/composer-wrapper/actions/workflows/ci.yml) ## What for?