Skip to content

Commit

Permalink
Add validate action
Browse files Browse the repository at this point in the history
  • Loading branch information
ajparsons committed Dec 9, 2024
1 parent 95a08f7 commit a5b7b97
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Validate

on: [push]

jobs:
test:
name: Validate
runs-on: ubuntu-latest

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

- uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: setup ruff
run: pip install mysoc-validator==0.9.3

- name: Check and format
run: |
python -m mysoc_validator popolo validate members/people.json --format
- name: Check format hasn't changed anything
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "Uncommitted changes detected:"
git status --porcelain
exit 1
else
echo "No file changes detected."
fi

0 comments on commit a5b7b97

Please sign in to comment.