-
Notifications
You must be signed in to change notification settings - Fork 1
129 lines (124 loc) · 4.24 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Test
on: [push]
env:
python_version: '3.10'
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- run: echo Perfoming lint check...
- name: Check out repository code
uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ env.python_version }}
- name: Lint with Pre-commit
run: pip install pre-commit && pre-commit run --all-files
linux:
needs: lint
runs-on: ubuntu-20.04
timeout-minutes: 30
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
python_version: ["3.7", "3.8", "3.9"]
steps:
- name: Check out repository code
uses: actions/[email protected]
- name: Install Linux Dependencies
uses: ./.github/actions/linux_dependencies
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python_version }}
- name: Use Python Dependency Cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Upgrade pip. setuptools and wheel
run: python -m pip install --upgrade pip setuptools wheel
- name: Install pip dependencies
run: pip install -r requirements.txt
- name: Install pytest
run: pip install -r requirements_test.txt
- name: Install pfxbrick
run: python setup.py install
- name: Run tests
run: cd tests && pytest -v
macos:
needs: lint
runs-on: macos-latest
timeout-minutes: 30
if: "!contains(github.event.head_commit.message, 'skip ci')"
# env:
# LDFLAGS: -L/usr/local/opt/[email protected]/lib
# PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/[email protected]/lib/pkgconfig:${PKG_CONFIG_PATH:-}
steps:
- name: Check out repository code
uses: actions/[email protected]
- name: Install macOS Dependencies
uses: ./.github/actions/macos_dependencies
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ env.python_version }}
- name: Use Python Dependency Cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Upgrade pip. setuptools and wheel
run: python -m pip install --upgrade pip setuptools wheel
- name: Install pip dependencies
run: pip install -r requirements.txt
- name: Install pytest
run: pip install -r requirements_test.txt
- name: Install pfxbrick
run: python setup.py install
- name: Run tests
run: cd tests && pytest -v
windows:
needs: lint
runs-on: windows-latest
timeout-minutes: 45
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Check out repository code
uses: actions/[email protected]
- name: Install libusb with msys2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: mingw-w64-x86_64-hidapi mingw-w64-x86_64-libusb
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ env.python_version }}
- name: Use Python Dependency Cache
uses: actions/[email protected]
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Upgrade pip
run: python -m pip install --upgrade pip setuptools wheel
- name: Install scikit-build
run: pip install scikit-build
- name: Install pip dependencies
run: pip install -r requirements.txt
- name: Install pytest
run: pip install -r requirements_test.txt
- name: Install pfxbrick
run: python setup.py install
- name: Run tests
run: cd tests && pytest -v