Debian Codegraph @

.github/workflows/test-xmlschema.yml

raw
1 name: xmlschema
2
3 on:
4 push:
5 branches: [master, develop]
6 pull_request:
7 branches: [master, develop]
8
9 jobs:
10 build:
11
12 runs-on: ${{ matrix.os }}
13 strategy:
14 fail-fast: false
15 matrix:
16 os: [ubuntu-latest, macos-latest, windows-latest]
17 python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-beta.2", "pypy-3.10"]
18 exclude:
19 - os: macos-latest
20 python-version: "3.9"
21 - os: windows-latest
22 python-version: "3.9"
23
24 steps:
25 - uses: actions/checkout@v4
26 - name: Set up Python ${{ matrix.python-version }}
27 uses: actions/setup-python@v5
28 with:
29 python-version: ${{ matrix.python-version }}
30 - name: Install pip and setuptools
31 run: |
32 python -m pip install --upgrade pip
33 pip install setuptools
34 - name: Build and install lxml for Python 3.14-alpha
35 if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14.0-beta.2' }}
36 run: |
37 sudo apt-get install -y libxml2-dev libxslt-dev python3-dev
38 pip install lxml
39 - name: Install lxml for Python < 3.14
40 if: ${{ matrix.python-version != '3.14.0-beta.2' }}
41 run: pip install lxml
42 - name: Install other optional dependencies
43 run: pip install jinja2
44 - name: Test with unittest
45 run: |
46 pip install .
47 python -m unittest
48 - name: Lint with flake8
49 run: |
50 pip install flake8
51 flake8 xmlschema --max-line-length=100 --statistics
52 - name: Lint with mypy
53 run: |
54 pip install mypy==1.15.0 elementpath==5.0.1 lxml-stubs
55 mypy --show-error-codes --strict xmlschema