-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Travis CI with GitHub Actions
- Loading branch information
Showing
8 changed files
with
189 additions
and
60 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/.github export-ignore | ||
/build export-ignore | ||
/build.xml export-ignore | ||
/tests export-ignore |
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,9 @@ | ||
version: 2 | ||
|
||
updates: | ||
- | ||
package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' | ||
open-pull-requests-limit: 3 |
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,161 @@ | ||
name: 'CI' | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
env: | ||
CONSISTENCE_PHP_VERSION: '7.3' | ||
|
||
jobs: | ||
composer-validate: | ||
name: 'Composer validate' | ||
runs-on: 'ubuntu-latest' | ||
|
||
steps: | ||
- | ||
name: 'Checkout' | ||
uses: 'actions/checkout@v3' | ||
- | ||
name: 'Setup PHP ${{ env.CONSISTENCE_PHP_VERSION }}' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '${{ env.CONSISTENCE_PHP_VERSION }}' | ||
coverage: 'none' | ||
- | ||
name: 'Setup problem matchers for PHP' | ||
run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"' | ||
- | ||
name: 'Composer install' | ||
uses: 'ramsey/composer-install@v1' | ||
with: | ||
dependency-versions: 'highest' | ||
- | ||
name: 'Composer validate' | ||
run: 'bin/phing composer-validate' | ||
|
||
lint: | ||
name: 'Lint - PHP ${{ matrix.php-version }}' | ||
needs: 'composer-validate' | ||
runs-on: 'ubuntu-latest' | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- '7.2' | ||
- '7.3' | ||
|
||
steps: | ||
- | ||
name: 'Checkout' | ||
uses: 'actions/checkout@v3' | ||
- | ||
name: 'Setup PHP ${{ matrix.php-version }}' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '${{ matrix.php-version }}' | ||
coverage: 'none' | ||
- | ||
name: 'Setup problem matchers for PHP' | ||
run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"' | ||
- | ||
name: 'Composer install' | ||
uses: 'ramsey/composer-install@v1' | ||
with: | ||
dependency-versions: 'highest' | ||
- | ||
name: 'Lint' | ||
run: 'bin/phing phplint' | ||
|
||
coding-standard: | ||
name: 'Coding standard' | ||
needs: 'lint' | ||
runs-on: 'ubuntu-latest' | ||
|
||
steps: | ||
- | ||
name: 'Checkout' | ||
uses: 'actions/checkout@v3' | ||
- | ||
name: 'Setup PHP ${{ env.CONSISTENCE_PHP_VERSION }}' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '${{ env.CONSISTENCE_PHP_VERSION }}' | ||
coverage: 'none' | ||
tools: 'cs2pr' | ||
- | ||
name: 'Setup problem matchers for PHP' | ||
run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"' | ||
- | ||
name: 'Composer install' | ||
uses: 'ramsey/composer-install@v1' | ||
with: | ||
dependency-versions: 'highest' | ||
- | ||
name: 'Check coding standard' | ||
run: 'bin/phing create-dirs cs || cat build/log/phpcs-checkstyle.xml | cs2pr' | ||
|
||
tests: | ||
name: 'Tests - PHP ${{ matrix.php-version }}, ${{ matrix.composer-dependencies }} dependencies' | ||
needs: 'lint' | ||
runs-on: 'ubuntu-latest' | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- '7.2' | ||
- '7.3' | ||
composer-dependencies: | ||
- 'highest' | ||
- 'lowest' | ||
|
||
steps: | ||
- | ||
name: 'Checkout' | ||
uses: 'actions/checkout@v3' | ||
- | ||
name: 'Setup PHP ${{ matrix.php-version }}' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '${{ matrix.php-version }}' | ||
coverage: 'xdebug' | ||
- | ||
name: 'Setup problem matchers for PHP' | ||
run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"' | ||
- | ||
name: 'Setup problem matchers for PHPUnit' | ||
run: 'echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"' | ||
- | ||
name: 'Composer install' | ||
uses: 'ramsey/composer-install@v1' | ||
with: | ||
dependency-versions: '${{ matrix.composer-dependencies }}' | ||
- | ||
name: 'Run tests' | ||
run: 'bin/phing tests' | ||
- | ||
name: 'Upload code coverage to Coveralls' | ||
env: | ||
COVERALLS_REPO_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
COVERALLS_PARALLEL: true | ||
COVERALLS_FLAG_NAME: 'php-${{ matrix.php-version }}+${{ matrix.composer-dependencies }}-dependencies' | ||
run: | | ||
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar | ||
php php-coveralls.phar --verbose --config build/coveralls.yml | ||
finish_coveralls: | ||
name: 'Finish Coveralls upload' | ||
needs: 'tests' | ||
runs-on: 'ubuntu-latest' | ||
|
||
steps: | ||
- | ||
name: 'Finish Coveralls upload' | ||
uses: 'coverallsapp/[email protected]' | ||
with: | ||
github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
parallel-finished: true |
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
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,3 +1,3 @@ | ||
coverage_clover: build/log/coverage/clover.xml | ||
json_path: build/log/coverage/coveralls-upload.json | ||
service_name: travis-ci | ||
service_name: github |
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
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