forked from tefra/xsdata
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (82 loc) · 2.57 KB
/
Copy pathtests.yml
File metadata and controls
84 lines (82 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
include:
- {name: PyPy 3.6, python: pypy-3.6, os: ubuntu}
- {name: PyPy 3.7, python: pypy-3.7, os: ubuntu}
- {name: Python 3.6, python: 3.6, os: ubuntu}
- {name: Python 3.7, python: 3.7, os: ubuntu}
- {name: Python 3.8, python: 3.8, os: ubuntu}
- {name: Python 3.9, python: 3.9-dev, os: ubuntu}
- {name: Windows py37, python: 3.7, os: windows}
- {name: MacOS py37, python: 3.7, os: macos}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install libxml2
if: matrix.python == 'pypy-3.6' || matrix.python == 'pypy-3.7'
run: |
sudo apt-get install libxml2-dev libxslt-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools tox codecov
- name: Test
run: |
tox -e py
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
benchmark:
name: Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install tox
- name: Benchmark
run: |
tox -e benchmarks
minimum:
name: Minimum Installation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pip install .
run: |
pip install -e .
- name: Verify
run: |
python tests/integration/benchmarks/conftest.py -c XmlEventWriter
python tests/integration/benchmarks/conftest.py -c XmlEventHandler
python tests/integration/benchmarks/conftest.py -c JsonParser
python tests/integration/benchmarks/conftest.py -c JsonSerializer
xsdata | xargs -0 python -c "import sys; assert 'Install cli' in sys.argv[1]"
pre-commit:
name: Pre-commit Hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.2