-
Notifications
You must be signed in to change notification settings - Fork 30
147 lines (147 loc) · 4.6 KB
/
run-tests.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: run-tests
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
jobs:
linux_tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
pip install . install
pip install -r requirements-test.txt
- name: Run tests
run: pytest
# The default Linux Ubuntu 22+ does not support Python < 3.8 any longer
# To keep testing Python < 3.8, use Ubuntu 20
linux_legacy_tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.7"]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
pip install . install
pip install -r requirements-test.txt
- name: Run tests
run: pytest
mac_tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
# github actions currently resolves the pyyaml pip install package
# for python 3.9 not to the required macos package, but to the
# default pyyaml 6.0.tar package, which is a linux distribution
# and fails on install. MacOS Python version 3.9 build will stay
# disabled until this is resolved.
#python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
pip install .
pip install -r requirements-test.txt
- name: Run tests
run: pytest
# The current rdflib dependency causes random issues on some of
# the github actions windows builds; since the appveyor builds
# are passing without any issue, keep most gh actions windows
# builds deactivated until the rdflib dependency has been
# been updated.
win_tests:
continue-on-error: true
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
pip install .
pip install -r requirements-test.txt
- name: Run tests
run: pytest
run-coverall:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
pip install .
pip install -r requirements-test.txt
pip install pytest coveralls
- name: Create coverage
run: |
coverage run --source=odml -m pytest test/
- name: Submit to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github
run-codecov:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install .
pip install -r requirements-test.txt
pip install pytest pytest-cov
- name: Create coverage
run: |
pytest --cov=./ --cov-report=xml
- uses: codecov/codecov-action@v1
with:
name: Submit Codecov coverage
files: ./coverage.xml
verbose: true # optional (default = false)