-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (89 loc) · 2.69 KB
/
test.yml
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
85
86
87
88
89
90
91
92
93
94
95
# GitHub Actions workflow for test suite
# vim: set ts=8 sts=2 sw=2:
name: Test
on:
push:
branches:
- dev
pull_request:
jobs:
test_minimum_md4c:
name: Test minimum MD4C version
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}
- id: md4c-version
name: Get compatible MD4C version
uses: ./.github/actions/md4c-version
- name: Fetch MD4C
uses: actions/checkout@v3
with:
repository: mity/md4c
ref: release-${{steps.md4c-version.outputs.md4c-min}}
path: md4c-lib
- name: Build and install MD4C
run: |
mkdir md4c-lib/build
cd md4c-lib/build
cmake ..
make
sudo make install
sudo ldconfig
- name: Install Python packaging tools
run: python -m pip install --upgrade pip setuptools wheel
- name: Install PyMD4C with test dependencies
run: python -m pip install .[test]
- name: Check setup.py
run: python setup.py check -m -s
- name: Run flake8
run: flake8 setup.py md4c/
- name: Run Pytest
run: pytest -vv test/ --md4c-version ${{steps.md4c-version.outputs.md4c-min}}
run_tests:
name: Run tests
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}
- id: md4c-version
name: Get compatible MD4C version
uses: ./.github/actions/md4c-version
- name: Fetch MD4C
uses: actions/checkout@v3
with:
repository: mity/md4c
ref: release-${{steps.md4c-version.outputs.md4c-version}}
path: md4c-lib
- name: Build and install MD4C
run: |
mkdir md4c-lib/build
cd md4c-lib/build
cmake ..
make
sudo make install
sudo ldconfig
- name: Install Python packaging tools
run: python -m pip install --upgrade pip setuptools wheel
- name: Install PyMD4C with test dependencies
run: python -m pip install .[test]
- name: Check setup.py
run: python setup.py check -m -s
- name: Run flake8
run: flake8 setup.py md4c/
- name: Run Pytest
run: pytest -vv test/