Skip to content

Commit

Permalink
Merge 689b026 into c1042fd
Browse files Browse the repository at this point in the history
  • Loading branch information
JustSteveKing committed Sep 23, 2020
2 parents c1042fd + 689b026 commit a6e01e3
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 43 deletions.
42 changes: 0 additions & 42 deletions .circleci/config.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/run-tests.yml
@@ -0,0 +1,43 @@
name: The PHP League Tests

on: [push, pull_request]

jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4]

name: League - PHP ${{ matrix.php }} on ${{ matrix.os }}

steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: phpcs, phpunit

- name: Validate Composer
run: composer validate

- name: Cache Dependencies
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ matrix.os }}-composer-cache-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ matrix.os }}-php-${{ matrix.php }}

- name: Install Dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Execute Tests
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
32 changes: 32 additions & 0 deletions .github/workflows/style-checker.yml
@@ -0,0 +1,32 @@
name: The PHP League Style Checks

on: [push, pull_request]

jobs:
style:
runs-on: ubuntu-latest
name: The PHP League Style Checks
steps:

- name: Checkout Code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Cache Dependencies
id: composer-cache-style
uses: actions/cache@v2
with:
path: vendor
key: ubuntu-composer-cache-style-${{ hashFiles('**/composer.lock') }}
restore-keys: ubuntu-php-style

- name: Install Dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Check Coding Style
run: vendor/bin/phpcs src/
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -28,4 +28,4 @@ script:
- if [[ "$COLLECT_COVERAGE" == "true" ]]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover; else vendor/bin/phpunit --no-coverage; fi

after_script:
- if [[ "$COLLECT_COVERAGE" == "true" ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
- if [[ "$COLLECT_COVERAGE" == "true" ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
5 changes: 5 additions & 0 deletions composer.json
Expand Up @@ -47,6 +47,11 @@
"League\\Fractal\\Test\\": "test"
}
},
"scripts": {
"check": "vendor/bin/phpcs src/",
"test": "vendor/bin/phpunit --testdox --colors=always",
"test:coverage": "vendor/bin/phpunit --coverage-html build/coverage"
},
"extra": {
"branch-alias": {
"dev-master": "0.20.x-dev"
Expand Down

0 comments on commit a6e01e3

Please sign in to comment.