diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml new file mode 100644 index 0000000..ea913fc --- /dev/null +++ b/.github/workflows/integrate.yaml @@ -0,0 +1,76 @@ +# https://docs.github.com/en/actions + +name: "Integrate" + +on: + pull_request: null + push: + branches: + - "master" + +jobs: + tests: + name: "Tests" + + runs-on: "ubuntu-latest" + + strategy: + fail-fast: false + + matrix: + include: + - php-version: "7.1" + phpunit-version: "7.*" + + - php-version: "7.2" + phpunit-version: "7.*" + + - php-version: "7.2" + phpunit-version: "8.*" + + - php-version: "7.3" + phpunit-version: "8.*" + + - php-version: "7.3" + phpunit-version: "9.*" + + - php-version: "7.4" + phpunit-version: "8.*" + + - php-version: "7.4" + phpunit-version: "9.*" + + - php-version: "8.0" + phpunit-version: "8.*" + + - php-version: "8.0" + phpunit-version: "9.*" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Set up PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: "none" + php-version: "${{ matrix.php-version }}" + + - name: "Set up problem matchers for phpunit/phpunit" + run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\"" + + - name: "Determine composer cache directory" + run: "echo \"COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV" + + - name: "Cache dependencies installed with composer" + uses: "actions/cache@v2" + with: + path: "${{ env.COMPOSER_CACHE_DIR }}" + key: "php-${{ matrix.php-version }}-composer-${{ matrix.phpunit-version }}" + restore-keys: "php-${{ matrix.php-version }}-composer-" + + - name: "Require phpunit/phpunit ${{ matrix.phpunit-version }}" + run: "composer require phpunit/phpunit:${{ matrix.phpunit-version }}" + + - name: "Run tests with phpunit/phpunit" + run: "vendor/bin/phpunit" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a32c81d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: php - -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4 - - nightly - -env: - - PHPUNIT=7.* - - PHPUNIT=8.* - - PHPUNIT=9.* - - PHPUNIT=dev-master MIN_STABILITY=dev - -matrix: - exclude: - - php: 7.1 - env: PHPUNIT=8.* - - php: 7.1 - env: PHPUNIT=9.* - - php: 7.1 - env: PHPUNIT=dev-master MIN_STABILITY=dev - - php: 7.2 - env: PHPUNIT=9.* - - php: 7.2 - env: PHPUNIT=dev-master MIN_STABILITY=dev - allow_failures: - - php: nightly - -cache: - directories: - - $HOME/.composer - -before_script: - - phpenv config-rm xdebug.ini || true - - if [ "$MIN_STABILITY" != "" ]; then composer config minimum-stability $MIN_STABILITY; fi - - composer require phpunit/phpunit:${PHPUNIT} - -script: - - ./vendor/bin/phpunit diff --git a/README.md b/README.md index 502180c..0b42000 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # phpunit-speedtrap -[![Build Status](https://travis-ci.org/johnkary/phpunit-speedtrap.svg?branch=master)](https://travis-ci.org/johnkary/phpunit-speedtrap) +[![Integrate](https://github.com/johnkary/phpunit-speedtrap/workflows/Integrate/badge.svg?branch=master)](https://github.com/johnkary/phpunit-speedtrap/actions) SpeedTrap reports on slow-running PHPUnit tests right in the console.