Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 561363d

Browse files
committedDec 15, 2022
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.
1 parent 7eaa396 commit 561363d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
 

‎.github/workflows/xep-validation.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: XEP validation
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
name: Validate any XEP changes
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Detect changes to XEP files
18+
id: changed-xeps
19+
uses: tj-actions/changed-files@v34
20+
with:
21+
files: |
22+
xep-*.xml
23+
inbox/*
24+
25+
- name: Validate changed file(s)
26+
id: validation
27+
if: steps.changed-xeps.outputs.any_changed == 'true'
28+
run: |
29+
sudo apt-get install -y libxml2-utils
30+
result=0
31+
for xep in "${{ steps.changed-xeps.outputs.all_changed_files }}"; do
32+
if ! tools/validate-xep0001-conformance.sh "$xep"; then
33+
result=1
34+
fi
35+
done
36+
exit $result

0 commit comments

Comments
 (0)
Please sign in to comment.