Skip to content

Commit

Permalink
Added Composer config validation to CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed May 13, 2024
1 parent 0014db7 commit 03c7dc3
Show file tree
Hide file tree
Showing 3 changed files with 26 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 @@ -259,6 +259,10 @@ jobs:
mkdir -p "${DREVOPS_EXPORT_CODE_DIR}"
docker compose cp -L cli:"/app/." "${DREVOPS_EXPORT_CODE_DIR}"
- run:
name: Validate Composer configuration
command: docker compose exec cli composer validate --strict || [ "${DREVOPS_CI_COMPOSER_VALIDATE_IGNORE_FAILURE:-0}" -eq 1 ]

- run:
name: Install development dependencies
command: |
Expand Down
6 changes: 6 additions & 0 deletions .scaffold/docs/.utils/variables/extra/ci.variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ DREVOPS_EXPORT_DB_CONTAINER_REGISTRY_DEPLOY_PROCEED=
# Directory to store exported code.
DREVOPS_EXPORT_CODE_DIR=

# Ignore Hadolint failures.
DREVOPS_CI_HADOLINT_IGNORE_FAILURE=0

# Ignore `composer validate` failures.
DREVOPS_CI_COMPOSER_VALIDATE_IGNORE_FAILURE=0

# Ignore PHPCS failures.
DREVOPS_CI_PHPCS_IGNORE_FAILURE=0

Expand Down
16 changes: 16 additions & 0 deletions .scaffold/docs/content/workflows/variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,22 @@ Default value: `UNDEFINED`

Defined in: `CI config`

### `DREVOPS_CI_COMPOSER_VALIDATE_IGNORE_FAILURE`

Ignore `composer validate` failures.

Default value: `UNDEFINED`

Defined in: `CI config`

### `DREVOPS_CI_HADOLINT_IGNORE_FAILURE`

Ignore Hadolint failures.

Default value: `UNDEFINED`

Defined in: `CI config`

### `DREVOPS_CI_NPM_LINT_IGNORE_FAILURE`

Ignore NPM linters failures.
Expand Down

1 comment on commit 03c7dc3

@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.