Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:
- "push"

jobs:

init-php-doc:
name: "Init the php documentation cache"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2.0.0"

- name: "Cache PHP documentation checked out with svn"
id: cache-svn
uses: "actions/cache@v1.0.3"
Expand All @@ -26,7 +26,7 @@ jobs:
if: steps.cache-svn.outputs.cache-hit != 'true'
run: svn co https://svn.php.net/repository/phpdoc/modules/doc-en doc-en
working-directory: "generator/doc"

continuous-integration:
name: "Continuous Integration"

Expand All @@ -49,7 +49,7 @@ jobs:
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@1.8.2"
with:
coverage: "none"
coverage: "pcov"
php-version: "${{ matrix.php-version }}"

- name: "Cache PHP documentation checked out with svn"
Expand Down Expand Up @@ -120,12 +120,16 @@ jobs:
run: "composer install && composer rector && composer test"
working-directory: "generator/tests/rector/0.6"

#- name: "Archive code coverage results"
# uses: "actions/upload-artifact@v1"
# with:
# name: "build"
# path: "generator/build"
#
#- name: "Upload test coverage to coveralls"
# run: "php vendor/bin/php-coveralls -v"
# working-directory: "generator"
- name: "Archive code coverage results"
uses: "actions/upload-artifact@v1"
with:
name: "build"
path: "generator/build"

- name: "Upload test coverage to coveralls"
continue-on-error: true
run: "php vendor/bin/php-coveralls -v"
working-directory: "generator"
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
Copy link
Contributor Author

@localheinz localheinz Feb 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The secret COVERALLS_REPO_TOKEN needs to be provided.

However, secrets will not be available when actions are triggered by actors who do not have write privileges. That's why I added continue-on-error here.

For reference, see:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That means that anyone other than moufmouf or me will not benefit from the code coverage report.
That makes it kinda useless. Could we not use the option --dry-run to do the report locally and make it create an error if the code coverage goes down?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COVERALLS_RUN_LOCALLY: 1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
vendor/
/generator/tests/rector/0.5/composer.lock
/generator/tests/rector/0.6/composer.lock
.phpunit.result.cache
4 changes: 2 additions & 2 deletions generator/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
}
},
"require": {
"php": ">=7.1",
"php": "^7.2",
"ext-simplexml": "*",
"ext-json": "^1.5",
"symfony/console": "^4.1.4",
"symfony/process": "^4.1",
"symfony/finder": "^4.1"
},
"require-dev": {
"phpunit/phpunit": "^7",
"phpunit/phpunit": "^8.5.2",
"phpstan/phpstan": "^0.12",
"thecodingmachine/phpstan-strict-rules": "^0.12",
"squizlabs/php_codesniffer": "^3.2",
Expand Down
Loading