Skip to content

Adds UnitHeightAboveGrade element #421

Adds UnitHeightAboveGrade element

Adds UnitHeightAboveGrade element #421

Workflow file for this run

name: Test Schemas
on:
push:
branches: [ master ]
pull_request:
types: [ synchronize, opened ]
workflow_dispatch:
jobs:
test-xsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
- name: Test with pytest
run: |
pytest tests
flatten-xsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install lxml
- name: Install software
shell: bash
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt update
sudo -E apt-get install -y libxml2-utils
- name: Flatten XSD
run: |
cd schemas
python ../scripts/xsdflatten.py HPXML.xsd ../merged_schema/HPXMLMerged.xsd
- name: Commit XSD
run: |
branch_name="${{ github.head_ref }}"
git pull origin $branch_name
git add merged_schema/HPXMLMerged.xsd
git status
if [[ $(git diff --cached --exit-code) ]]; then
git config --global user.email "github-action@users.noreply.github.com"
git config --global user.name "GitHub Action"
git commit -m "Latest HPXMLMerged.xsd"
echo "Pushing to branch: $branch_name"
git push -u origin $branch_name
fi
- name: Validate XSD
run: |
export XSDPATH=merged_schema/HPXMLMerged.xsd
xmllint --schema $XSDPATH examples/audit.xml --noout