Skip to content

Commit 58be6e8

Browse files
committed
Build from source in CI
1 parent fd4e604 commit 58be6e8

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/pullrequest.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Python package
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: [2.7, 3.5, 3.8, 3.9]
18+
19+
steps:
20+
- uses: actions/[email protected]
21+
with:
22+
submodules: true
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python3 --version
30+
python3 -m venv venv
31+
source venv/bin/activate
32+
python3 -m pip install --upgrade pip
33+
pip install numpy
34+
pip install scikit-build cmake
35+
- name: check pip
36+
run: pip --version
37+
- name: build
38+
run: python setup.py bdist_wheel
39+
- name: Install for test
40+
run: |
41+
pip install flake8 pytest
42+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
43+
- name: Lint with flake8
44+
run: |
45+
# stop the build if there are Python syntax errors or undefined names
46+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
47+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
48+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
49+
- name: Test with pytest
50+
run: |
51+
pytest

0 commit comments

Comments
 (0)