-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
for xsf#1240: Integrate XEP validation in CI
Adds a Github workflow that executes `tools/validate-xep0001-conformance.sh` against any changed XEP that was changed in a pull request.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: XEP validation | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Validate any XEP changes | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Detect changes to XEP files | ||
id: changed-xeps | ||
uses: tj-actions/changed-files@v34 | ||
with: | ||
files: | | ||
xep-*.xml | ||
inbox/* | ||
- name: Validate changed file(s) | ||
id: validation | ||
if: steps.changed-xeps.outputs.any_changed == 'true' | ||
run: | | ||
sudo apt-get install -y libxml2-utils | ||
result=0 | ||
for xep in "${{ steps.changed-xeps.outputs.all_changed_files }}"; do | ||
if ! tools/validate-xep0001-conformance.sh "$xep"; then | ||
result=1 | ||
fi | ||
done | ||
exit $result |