-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show suggestion on unknown target #1477
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1477 +/- ##
============================================
+ Coverage 52.91% 52.92% +0.01%
- Complexity 9217 9222 +5
============================================
Files 470 470
Lines 22375 22385 +10
============================================
+ Hits 11840 11848 +8
- Misses 10535 10537 +2
Continue to review full report at Codecov.
|
188073a
to
481b95d
Compare
Hi, I had some issues with Github Actions. It seems that:
I did my best to fix those since I have no experience with Github Actions. |
|
||
- name: Transfer coverage | ||
if: github.repository_owner == 'phingofficial' | ||
with: | ||
php-version: '7.4' | ||
run: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jawira you cannot have both with
and run
in one step.
I would suggest to go by:
coverage:
runs-on: ubuntu-latest
needs:
- static_code_analysis
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
ini-values: xdebug.mode=coverage
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Composer install
run: composer install --no-interaction --no-progress --ansi
- name: Test with coverage
working-directory: test
run: |
echo "=== SETTING GIT IDENTITY ==="
git config --global user.email "github-ci-build@phing.info"
git config --global user.name "Phing Github Action"
echo "=== RUN TESTS ==="
../bin/phing -debug -Dtests.codecoverage=true -listener "phing.listener.StatisticsListener"
- name: Transfer coverage
if: github.repository_owner == 'phingofficial'
run: |
bash <(curl -s https://codecov.io/bash) -f ./test/reports/clover-coverage.xml
wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./test/reports/clover-coverage.xml
AFAIK we are using PHP 7.4 for code-coverage step?! Where exactly did you have a problem with PHP 8? |
No, it wasn't PHP 7.4, by default this step used PHP 8 I added |
Ah ok - I see. There was a change in the OS ubuntu-latest was updated. So yes you are right. I will change to code-coverage with PHP 8.0 in a later PR. |
@jawira please check the new steps in my last suggestion - we have to add php 7.4 in a new single step and have the additional composer steps also (just take over my snipped) |
There was a wrong step in my post: - name: Composer install
run: composer install --no-interaction --no-progress --ansi
- name: Test with coverage
working-directory: test
run: |
echo "=== SETTING GIT IDENTITY ==="
git config --global user.email "github-ci-build@phing.info"
git config --global user.name "Phing Github Action"
echo "=== RUN TESTS ==="
../bin/phing -debug -Dtests.codecoverage=true -listener "phing.listener.StatisticsListener" After that change I would merge. |
@jawira thanks for your PR I will merge it and have a look in the build pipeline if something strange should occure in master. |
This adds the message
Did you mean 'target'?
when target is not found.For example:
This was some kind of pet feature for me, so don't hesitate to close this PR if you think it's not useful :)