Skip to content

Validate composer.json as part of CI workflows #1636

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

Merged
merged 4 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/composer-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Check validity of composer.json"
Copy link
Member

Choose a reason for hiding this comment

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

@alcaeus: I assume this was done for the PIE package, but did you plan to copy this workflow to PHPLIB as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this was done to make sure we're alerted to changes to the pie schema, especially as it may change during the development process. I can copy the workflow over to PHPLIB 👍


on:
pull_request:
branches:
- "v*.*"
- "master"
- "feature/*"
push:
branches:
- "v*.*"
- "master"
- "feature/*"

jobs:
composer-validate:
name: "Check validity of composer.json"
runs-on: "ubuntu-24.04"

steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
submodules: true

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"

- name: "Run composer validate"
run: "composer validate --strict"
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "mongodb/mongodb-extension",
"description": "MongoDB driver extension",
"type": "php-ext",
"keywords": ["database", "driver", "mongodb", "persistence"],
"homepage": "https://jira.mongodb.org/browse/PHPC",
Expand Down Expand Up @@ -69,4 +70,4 @@
}
]
}
}
}