Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: Switch to using GitHub actions
- Loading branch information
1 parent
53e1d07
commit 229e860
Showing
2 changed files
with
65 additions
and
35 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,65 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
||
on: | ||
- pull_request | ||
- push | ||
|
||
name: "Continuous Integration" | ||
|
||
jobs: | ||
continuous-integration: | ||
name: "Continuous Integration" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- 7.3 | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@master | ||
|
||
- name: "Install PHP with extensions" | ||
uses: shivammathur/setup-php@master | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extension-csv: "intl, json, pdo, xdebug" | ||
coverage: "xdebug" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.composer/cache | ||
key: ${{ matrix.php-version }}-composer-locked-${{ github.sha }} | ||
restore-keys: | | ||
${{ matrix.php-version }}-composer-locked- | ||
- name: "Install dependencies with composer" | ||
run: $(which composer) install | ||
|
||
- name: "Copy configuration" | ||
run: cp src/config.php.dist src/config.php | ||
|
||
- name: "Lint files with parallel-lint" | ||
run: vendor/bin/parallel-lint --exclude vendor . | ||
|
||
- name: "Check code style with phpcs" | ||
run: vendor/bin/phpcs --runtime-set ignore_warnings_on_exit true -p . | ||
|
||
- name: "Run a static code analysis with phpstan" | ||
run: vendor/bin/phpstan analyze --configuration=phpstan.neon | ||
|
||
- name: "Run dependency analysis with security-checker" | ||
run: vendor/bin/security-checker security:check composer.lock | ||
|
||
- name: "Dump Xdebug filter with phpunit" | ||
run: vendor/bin/phpunit --dump-xdebug-filter=build/xdebug-filter.php | ||
|
||
- name: "Run tests with phpunit" | ||
run: vendor/bin/phpunit --coverage-clover=build/logs/clover.xml --coverage-text --prepend=build/xdebug-filter.php | ||
|
||
- name: "Send code coverage to codecov.io" | ||
run: bash <(curl -s https://codecov.io/bash) | ||
|
This file was deleted.
Oops, something went wrong.