-
-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2420 from zephir-lang/phpcs-changes
PSR-12 and PHPCS
- Loading branch information
Showing
358 changed files
with
58,054 additions
and
19,096 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
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
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 |
---|---|---|
|
@@ -45,10 +45,11 @@ jobs: | |
phpcs --version | ||
phpcs --runtime-set ignore_warnings_on_exit true | ||
- name: Run PHP CS Fixer | ||
if: always() | ||
run: | | ||
php-cs-fixer fix --diff --dry-run -v --using-cache=no | ||
# Disabling for now until I figure out the rules | ||
# - name: Run PHP CS Fixer | ||
# if: always() | ||
# run: | | ||
# php-cs-fixer fix --diff --dry-run -v --using-cache=no | ||
|
||
- name: Run Shell Check | ||
if: always() | ||
|
@@ -175,28 +176,80 @@ jobs: | |
shell: pwsh | ||
run: | | ||
php vendor/bin/phpunit -c phpunit.ext.xml | ||
env: | ||
XDEBUG_MODE: coverage | ||
|
||
- name: Unit Tests (Zephir) | ||
if: always() | ||
run: php vendor/bin/phpunit --testsuite Zephir | ||
run: php vendor/bin/phpunit --testsuite Zephir --coverage-php ./tests/output/clover.xml | ||
env: | ||
XDEBUG_MODE: coverage | ||
|
||
- name: "Upload coverage file artifact" | ||
uses: "actions/upload-artifact@v3" | ||
with: | ||
name: "unit-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.name }}.coverage" | ||
path: "tests/output/clover.xml" | ||
|
||
- name: Black-box Testing | ||
if: always() && runner.os != 'Windows' | ||
shell: bash | ||
working-directory: tests/sharness | ||
run: | | ||
make -j$(getconf _NPROCESSORS_ONLN) | ||
- name: Upload Code Coverage Report | ||
uses: codecov/codecov-action@v3 | ||
upload-coverage: | ||
permissions: | ||
contents: read | ||
|
||
name: "Upload coverage" | ||
runs-on: "ubuntu-22.04" | ||
needs: | ||
- "build-and-test" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: 'Qodana Scan' | ||
uses: JetBrains/[email protected] | ||
env: | ||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} | ||
with: | ||
args: --baseline,qodana.sarif.json | ||
|
||
- name: "Create download folder" | ||
run: | | ||
mkdir -p reports | ||
- name: "Download coverage files" | ||
uses: "actions/download-artifact@v3" | ||
with: | ||
path: "reports" | ||
|
||
- name: "Display structure of downloaded files" | ||
run: ls -R | ||
working-directory: reports | ||
|
||
- name: "Upload to Codecov" | ||
uses: "codecov/codecov-action@v3" | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./tests/output/clover.xml | ||
flags: unittests,${{ runner.os }},php-${{ matrix.php }} | ||
directory: reports | ||
fail_ci_if_error: true | ||
verbose: true | ||
name: codecov-umbrella | ||
|
||
- name: "Upload to Qodana" | ||
run: | | ||
docker run \ | ||
-v $(pwd):/data/project/ \ | ||
-v ./reports/:/data/coverage \ | ||
-e QODANA_TOKEN="${{ secrets.QODANA_TOKEN }}" \ | ||
jetbrains/qodana-php | ||
- name: Upload build artifacts after Failure | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
|
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
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.