Skip to content

Commit

Permalink
Validate composer.json as part of CI workflows (#1636)
Browse files Browse the repository at this point in the history
* Add workflow to validate composer.json

* Add missing description to composer.json

* Add missing newline at EOF

* Auto-detect PHP version to use
  • Loading branch information
alcaeus authored Sep 9, 2024
1 parent ded0456 commit f9fdbc4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
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"

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 @@
}
]
}
}
}

0 comments on commit f9fdbc4

Please sign in to comment.