-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use GitHub actions instead of Travis
Also integrates Codecov. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
- Loading branch information
1 parent
7c61969
commit 6b17659
Showing
3 changed files
with
94 additions
and
53 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,91 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'bin/**' | ||
pull_request: | ||
paths-ignore: | ||
- 'bin/**' | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "8.1" | ||
- "8.2" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: none | ||
|
||
- name: Install Dependencies | ||
run: composer install --prefer-dist | ||
|
||
- name: Run Unit Tests | ||
run: ./vendor/bin/phpunit --testsuite=unit | ||
|
||
- name: Run Integration Tests | ||
run: ./vendor/bin/phpunit --testsuite=integration | ||
|
||
code-coverage: | ||
name: Code coverage | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: pcov | ||
|
||
- name: Install Dependencies | ||
run: composer install --prefer-dist | ||
|
||
- name: Generating Code Coverage Report | ||
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml | ||
|
||
- name: Send Code Coverage Report to Codecov.io | ||
uses: codecov/codecov-action@v3 | ||
|
||
static-analysis: | ||
name: Static Analysis | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist | ||
|
||
- name: Run DocHeader | ||
run: vendor/bin/docheader check library/ tests/ | ||
|
||
- name: Run PHP_CodeSniffer | ||
run: vendor/bin/phpcs | ||
|
||
- name: Run PHPStan | ||
run: vendor/bin/phpstan analyze |
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