Skip to content

Commit 6613c21

Browse files
committed
[MNT] Update CI in github action
1 parent 62d0d97 commit 6613c21

File tree

3 files changed

+101
-0
lines changed

3 files changed

+101
-0
lines changed

.github/workflows/build-and-test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: DeepForest-CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest]
15+
python-version: [3.6, 3.7, 3.8]
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Display python version
23+
run: python -c "import sys; print(sys.version)"
24+
- name: Install package dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
pip install -r build_tools/requirements.txt
29+
- name: Install
30+
run: pip install --verbose --editable .
31+
- name: Run tests
32+
run: |
33+
pytest ./tests --cov-config=.coveragerc --cov-report=xml --cov=deepforest deepforest
34+
- name: Publish code coverage
35+
uses: codecov/codecov-action@v1
36+
with:
37+
token: ${{ secrets.CODECOV_TOKEN }}
38+
file: ./coverage.xml

.github/workflows/build-wheels.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build-Wheels
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build_wheels:
11+
name: Build wheels on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest]
16+
python-version: [3.6, 3.7, 3.8]
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install cibuildwheel
24+
run: python -m pip install cibuildwheel==1.8.0
25+
- name: Build wheels
26+
run: python -m cibuildwheel --output-dir wheelhouse
27+
env:
28+
CIBW_BUILD: "cp36-manylinux_x86_64 cp37-manylinux_x86_64 cp38-manylinux_x86_64 cp36-win_amd64 cp37-win_amd64 cp38-win_amd64"
29+
- name: Store artifacts
30+
uses: actions/upload-artifact@v2
31+
with:
32+
path: ./wheelhouse/*.whl

.github/workflows/code-quality.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Code-Quality
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
code-quality:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest]
15+
python-version: [3.7]
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Display python version
23+
run: python -c "import sys; print(sys.version)"
24+
- name: Install package dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r build_tools/requirements.txt
28+
- name: Check code quality
29+
run: |
30+
chmod +x "${GITHUB_WORKSPACE}/build_tools/linting.sh"
31+
./build_tools/linting.sh

0 commit comments

Comments
 (0)