Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
74 additions
and
0 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,63 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
||
name: "Continuous Integration" | ||
|
||
on: | ||
- "pull_request" | ||
- "push" | ||
|
||
jobs: | ||
|
||
continuous-integration: | ||
name: "Continuous Integration" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
|
||
dependencies: | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP with extensions" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/cache@v1" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
|
||
- name: "Install dependencies with composer" | ||
run: "composer install --no-interaction" | ||
|
||
- name: "Run tests with phpunit/phpunit" | ||
run: "vendor/bin/phpunit" | ||
|
||
- name: "Run static code analysis with phpstan/phpstan" | ||
run: "composer phpstan" | ||
|
||
- name: "Run coding standard checks with squizlabs/php_codesniffer" | ||
run: "composer cs-check" | ||
|
||
- name: "Archive code coverage results" | ||
uses: "actions/upload-artifact@v1" | ||
with: | ||
name: "codeCoverage" | ||
path: "build" | ||
|
||
- uses: codecov/codecov-action@v1 # upload the coverage to codecov | ||
with: | ||
fail_ci_if_error: true # optional (default = false) |
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,11 @@ | ||
#todo: create deploy build | ||
|
||
#name: "Deploy" | ||
|
||
#on: | ||
create: | ||
tags: | ||
- v.* | ||
|
||
#jobs: | ||
|