-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: switch from travis to github actions (#7)
also test on php from 7.0 to 7.4
- Loading branch information
Showing
6 changed files
with
1,067 additions
and
310 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,117 @@ | ||
# https://docs.github.com/en/actions | ||
|
||
name: "Integrate" | ||
|
||
on: | ||
pull_request: null | ||
push: | ||
branches: | ||
- "master" | ||
|
||
env: | ||
PHP_EXTENSIONS: "curl, dom, json, simplexml, tokenizer, xmlwriter" | ||
|
||
jobs: | ||
static-code-analysis: | ||
name: "Static Code Analysis" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.3" | ||
|
||
dependencies: | ||
- "locked" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2.3.4" | ||
|
||
- name: "Install PHP with extensions" | ||
uses: "shivammathur/setup-php@2.10.0" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: "composer:v1" | ||
|
||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "ramsey/composer-install@1.3.0" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Create cache directory for vimeo/psalm" | ||
run: "mkdir -p build/psalm" | ||
|
||
- name: "Cache cache directory for vimeo/psalm" | ||
uses: "actions/cache@v2.1.4" | ||
with: | ||
path: "build/psalm" | ||
key: "php-${{ matrix.php-version }}-psalm-${{ github.sha }}" | ||
restore-keys: "php-${{ matrix.php-version }}-psalm-" | ||
|
||
- name: "Run vimeo/psalm" | ||
run: "bin/psalm --config=psalm.xml --diff --show-info=false --stats --threads=4" | ||
|
||
tests: | ||
name: "Tests" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.0" | ||
- "7.1" | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
|
||
dependencies: | ||
- "lowest" | ||
- "locked" | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2.3.4" | ||
|
||
- name: "Install PHP with extensions" | ||
uses: "shivammathur/setup-php@2.10.0" | ||
with: | ||
coverage: "xdebug" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: "composer:v1" | ||
|
||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "ramsey/composer-install@1.3.0" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run specification tests phpspec/phpspec" | ||
run: "bin/phpspec run --config=phpspec.yml" | ||
|
||
- name: "Collect the test coverage report using php-coveralls/php-coveralls" | ||
env: | ||
COVERALLS_REPO_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
COVERALLS_PARALLEL: true | ||
COVERALLS_FLAG_NAME: "${{ github.job }}-PHP-${{ matrix.php-version }} ${{ matrix.dependencies }}" | ||
run: "bin/php-coveralls -v" | ||
|
||
code-coverage: | ||
name: "Code Coverage" | ||
|
||
needs: | ||
- "tests" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- name: "Send code coverage report to Coveralls" | ||
uses: "coverallsapp/github-action@v1.1.2" | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
parallel-finished: true |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/build/ | ||
vendor | ||
bin |
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
Oops, something went wrong.