-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to Github Actions from Travis CI
Add the following workflows: - Unit Tests - phpunit - Coding Standards - phpcs - Coverage - run tests with coverage and upload to coveralls
- Loading branch information
1 parent
b69f5f4
commit b28fbee
Showing
5 changed files
with
86 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Coverage | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --no-suggest --optimize-autoloader | ||
|
||
- name: Add coveralls dependency | ||
run: composer require --dev php-coveralls/php-coveralls --no-progress --no-suggest --no-interaction | ||
|
||
- name: Run tests with coverage | ||
run: composer test-coverage | ||
|
||
- name: Upload coverage to Coveralls | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: php vendor/bin/php-coveralls -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Coding Standards | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
phpcs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
|
||
- name: Validate composer.json | ||
run: composer validate --strict | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --no-suggest --optimize-autoloader | ||
|
||
- name: Run CS checks | ||
run: composer cs-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Unit Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
phpunit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 15 | ||
matrix: | ||
dependencies: ['lowest', 'latest'] | ||
php-versions: ['7.3', '7.4', '8.0'] | ||
name: PHP ${{ matrix.php-versions }}, ${{ matrix.dependencies }} dependencies | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
|
||
- name: Install dependencies | ||
env: | ||
DEPS: ${{ matrix.dependencies }} | ||
run: | | ||
if [[ $DEPS != 'lowest' ]]; then composer update --no-progress --no-suggest --prefer-lowest --prefer-stable --optimize-autoloader ; else composer update --no-progress --no-suggest --prefer-dist --optimize-autoloader ; fi | ||
- name: Run tests | ||
run: composer test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters