-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.37 KB
/
ci.yaml
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
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version:
- 3.8
- 3.9
- "3.10"
- "3.11"
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4.1.0
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Store pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ runner.OS }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
restore-keys: |
pip-${{ runner.OS }}-${{ matrix.python-version }}-
pip-${{ runner.OS }}-
pip-
- name: Install prerequisites
run: sudo apt-get install libxml2-dev libxslt1-dev
if: matrix.python-version == 'pypy3'
- name: Install
run: |
python3 -m pip install -U pip wheel
python3 -m pip install -e .[dev]
- name: Run tests
run: |
mkdir -p results/pytest
coverage erase
coverage run -m pytest tests
coverage html
coverage xml -o results/pytest/junit.xml
- name: Upload test report
uses: actions/upload-artifact@v3
with:
name: test-report
path: |
results
htmlcov