Skip to content

Commit

Permalink
Merge pull request #376 from Yoast/JRF/composer-update-dev-dependencies
Browse files Browse the repository at this point in the history
Composer: update dev dependencies
  • Loading branch information
jrfnl committed Apr 7, 2024
2 parents 4eb662b + dcb5215 commit c3b5d32
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 173 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,23 @@ jobs:
custom-cache-suffix: $(date -u "+%Y-%m")

# Check the codestyle of the files against a threshold of expected errors and warnings.
# Keep track of the exit code as it determines whether to run the branch check or not.
# Exit code 128 means the thresholds needs to be lowered. Other exit codes imply CS errors.
- name: Check PHP code style against the thresholds
run: composer check-cs-thresholds
id: thresholds
run: |
set +e
composer check-cs-thresholds
exitcode="$?"
echo "EXITCODE=$exitcode" >> $GITHUB_OUTPUT
exit "$exitcode"
# Check the codestyle only of the files which were changed in the current branch.
# This step will only be executed if the threshold check exited with a failure status.
# The results of this CS check will be shown inline in the PR via the CS2PR tool.
# @link https://github.com/staabm/annotate-pull-request-from-checkstyle/
- name: Check PHP code style for the changes made in the branch only
if: ${{ failure() }}
if: ${{ failure() && steps.thresholds.outputs.EXITCODE != 128 }}
id: phpcs
run: composer check-branch-cs -- ${{ steps.base_branch.outputs.REF }}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"require-dev": {
"yoast/wp-test-utils": "^1.2.0",
"yoast/yoastcs": "^3.0"
"yoast/yoastcs": "^3.1.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
Loading

0 comments on commit c3b5d32

Please sign in to comment.