Skip to content

Commit

Permalink
Merge pull request #40 from peter279k/migrate_github_action
Browse files Browse the repository at this point in the history
Migrate to GitHub Action
  • Loading branch information
nubs authored Jan 12, 2021
2 parents 7ca8980 + ce514bb commit 690942a
Show file tree
Hide file tree
Showing 6 changed files with 1,357 additions and 380 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
name: PHP ${{ matrix.php }}
steps:
- uses: actions/checkout@v1
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
- name: Report PHP version
run: php -v
- name: Validate composer.json and composer.lock
run: composer validate
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ matrix.php }}-composer-
- name: Update dependencies
run: composer update --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: ./vendor/bin/phpunit --coverage-clover clover.xml
- name: Run coverage service
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: ./vendor/bin/php-coveralls --coverage_clover=./clover.xml -v
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
],
"license": "MIT",
"require": {
"php": "~5.6 || ~7.0"
"php": "~5.6 || ~7.0 || ~8.0"
},
"require-dev": {
"phpunit/phpunit": "^5.0 || ^6.5 || ^7.0",
"php-coveralls/php-coveralls": "~1.0",
"phpunit/phpunit": "^5.0 || ^6.5 || ^7.0 || ^9.0",
"php-coveralls/php-coveralls": "~2.4",
"cinam/randomizer": ">=1.1.1,<2.0",
"squizlabs/php_codesniffer": "~2.3"
},
Expand Down
Loading

0 comments on commit 690942a

Please sign in to comment.