-
Notifications
You must be signed in to change notification settings - Fork 383
114 lines (108 loc) · 2.88 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Tests
on:
- push
- pull_request
jobs:
pytest:
strategy:
fail-fast: false
matrix:
# These tests run on all os versions
env: [
{python: '3.8', tox: 'py38'},
{python: '3.9', tox: 'py39'},
{python: '3.10', tox: 'py310'},
{python: '3.11', tox: 'py311'},
]
os: [ubuntu-latest, windows-latest, macos-latest]
# These tests only run on ubuntu
include:
- os: ubuntu-latest
env:
python: '3.8'
tox: 'tensorflow-27'
- os: ubuntu-latest
env:
python: '3.9'
tox: 'tensorflow-28'
- os: ubuntu-latest
env:
python: '3.10'
tox: 'tensorflow-29'
- os: ubuntu-latest
env:
python: '3.10'
tox: 'tensorflow-210'
- os: ubuntu-latest
env:
python: '3.10'
tox: 'tensorflow-211'
- os: ubuntu-latest
env:
python: '3.9'
tox: 'numpy-120'
- os: ubuntu-latest
env:
python: '3.10'
tox: 'numpy-121'
- os: ubuntu-latest
env:
python: '3.10'
tox: 'numpy-123'
- os: ubuntu-latest
env:
python: '3.11'
tox: 'numpy-124'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.env.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.env.python }}
- name: Install tox
run: |
python -m pip install tox
- name: Test with tox against environments ${{ matrix.env.tox }}
run: python -m tox -e ${{ matrix.env.tox }}
test_pre_commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Test pre-commit
run: |
bash ./tests/check_pre_commit.sh
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install tox
run: |
python -m pip install tox
- name: Run coverage tox job
run: python -m tox -e coverage
setup:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install tox
run: |
python -m pip install tox
- name: Run setup tox job
run: python -m tox -e setup