Skip to content

Commit

Permalink
[#1413] Added composer normalize check to CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Oct 21, 2024
1 parent 273b8a4 commit cc95abe
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ jobs:
if [ -n \"${GITHUB_TOKEN:-}\" ]; then export COMPOSER_AUTH='{\"github-oauth\": {\"github.com\": \"${GITHUB_TOKEN-}\"}}'; fi && \
COMPOSER_MEMORY_LIMIT=-1 composer --ansi install --prefer-dist"
- run:
name: Validate Composer configuration normalised
command: docker compose exec -T cli composer normalize --dry-run || [ "${VORTEX_CI_COMPOSER_NORMALIZE_IGNORE_FAILURE:-0}" -eq 1 ]

- run:
name: Lint code with PHPCS
command: docker compose exec -T cli vendor/bin/phpcs || [ "${VORTEX_CI_PHPCS_IGNORE_FAILURE:-0}" -eq 1 ]
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ jobs:
if [ -n \"${GITHUB_TOKEN:-}\" ]; then export COMPOSER_AUTH='{\"github-oauth\": {\"github.com\": \"${GITHUB_TOKEN-}\"}}'; fi && \
COMPOSER_MEMORY_LIMIT=-1 composer --ansi install --prefer-dist"
- name: Validate Composer configuration normalised
run: docker compose exec -T cli composer normalize --dry-run
continue-on-error: ${{ vars.VORTEX_CI_COMPOSER_NORMALIZE_IGNORE_FAILURE == '1' }}

- name: Lint code with PHPCS
run: docker compose exec -T cli vendor/bin/phpcs
continue-on-error: ${{ vars.VORTEX_CI_PHPCS_IGNORE_FAILURE == '1' }}
Expand Down
3 changes: 3 additions & 0 deletions .vortex/docs/.utils/variables/extra/ci.variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ VORTEX_CI_HADOLINT_IGNORE_FAILURE=0
# Ignore `composer validate` failures.
VORTEX_CI_COMPOSER_VALIDATE_IGNORE_FAILURE=0

# Ignore `composer normalize` failures.
VORTEX_CI_COMPOSER_NORMALIZE_IGNORE_FAILURE=0

# Ignore PHPCS failures.
VORTEX_CI_PHPCS_IGNORE_FAILURE=0

Expand Down
8 changes: 8 additions & 0 deletions .vortex/docs/content/workflows/variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,14 @@ Default value: `UNDEFINED`

Defined in: `CI config`

### `VORTEX_CI_COMPOSER_NORMALIZE_IGNORE_FAILURE`

Ignore `composer normalize` failures.

Default value: `UNDEFINED`

Defined in: `CI config`

### `VORTEX_CI_COMPOSER_VALIDATE_IGNORE_FAILURE`

Ignore `composer validate` failures.
Expand Down

1 comment on commit cc95abe

@github-actions
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.