Skip to content

Merge pull request #12 from tefra/update-things #65

Merge pull request #12 from tefra/update-things

Merge pull request #12 from tefra/update-things #65

Workflow file for this run

name: tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
name: Python ${{ matrix.python }}
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python: [ "3.8", "3.9", "3.10", "3.11", "3.12-dev" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install .[lxml,cli,test,soap]
- name: Test
run: |
pytest --cov=./xsdata_attrs --cov-report=xml --cov-branch --doctest-glob="docs/*.rst"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
sample-tests:
name: Python ${{ matrix.python }} - ${{ matrix.collection.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: [ "3.10" ]
collection:
- { name: "Amadeus", id: "amadeus" }
- { name: "Autosar", id: "autosar" }
- { name: "BPMN", id: "bpmn" }
- { name: "Common Types", id: "common_types" }
- { name: "Crossref Metadata", id: "crossref" }
- { name: "DateX II", id: "datexii" }
- { name: "EWP", id: "ewp" }
- { name: "Generali", id: "generali" }
- { name: "NeTEx", id: "netex" }
- { name: "NPO API", id: "npo" }
- { name: "ReqIF", id: "reqif" }
- { name: "Sabre", id: "sabre" }
- { name: "SpaceX", id: "spacex" }
- { name: "Travelport", id: "travelport" }
- { name: "UBL", id: "ubl" }
- { name: "Voko", id: "voko" }
- { name: "XCBL", id: "xcbl" }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: tefra/xsdata-samples
ref: main
submodules: true
path: xsdata-samples
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
pip install --upgrade pip mypy types-attrs types-dataclasses typed_dataclass dataclasses-jsonschema
pip install .[cli,test]
- name: Generate Code
working-directory: ./xsdata-samples
run: ./run.py build ${{ matrix.collection.id }} --output-format=attrs
- name: Run Tests
working-directory: ./xsdata-samples
run: ./run.py test ${{ matrix.collection.id }} --output-format=attrs
- name: Run mypy
working-directory: ./xsdata-samples
if: matrix.collection.id != 'generali'
run: ./run.py mypy ${{ matrix.collection.id }} --output-format=attrs
pre-commit:
name: Pre-commit Hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0
check-package:
name: Build & Inspect Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hynek/build-and-inspect-python-package@v1