From 6679f26c089b25c5a21738d81d6ec261ecdb4c69 Mon Sep 17 00:00:00 2001 From: mpyw Date: Fri, 25 Jun 2021 16:38:55 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20GitHub=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 36 ++++++++++++++++++++++++++++++++++++ .travis.yml | 22 ---------------------- composer.json | 4 ---- 3 files changed, 36 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a7841d7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,36 @@ +name: Test + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + php: [7.1, 7.2, 7.3, 7.4, 8.0] + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: pcov + + - run: composer require phpunit/phpunit --dev --no-update + - run: composer update + - run: mkdir -p build/logs + - run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml + + - name: Upload Coverage + uses: nick-invision/retry@v2 + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + timeout_minutes: 1 + max_attempts: 3 + command: | + composer global require php-coveralls/php-coveralls + php-coveralls --coverage_clover=build/logs/clover.xml -v diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6f41278..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php - -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4 - - 8.0 - -cache: - directories: - - ./vendor - - $HOME/.composer/cache - -before_script: - - mkdir -p build/logs - -script: - - phpdbg -qrr vendor/bin/phpunit --coverage-clover build/logs/clover.xml - -after_success: - - travis_retry php vendor/bin/php-coveralls -v diff --git a/composer.json b/composer.json index 5644c8f..bb1136c 100644 --- a/composer.json +++ b/composer.json @@ -29,10 +29,6 @@ "ext-openssl": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^8.5" - }, - "scripts": { } }