Skip to content

Commit 5427159

Browse files
authored
YML file: CI Migration to Github Actions (#327)
1 parent 10b6d25 commit 5427159

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/main.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
# Controls when the workflow will run
4+
on:
5+
# Triggers the workflow on push or pull request events but only for the master branch
6+
push:
7+
branches: [ master ]
8+
pull_request:
9+
branches: [ master ]
10+
11+
jobs:
12+
13+
# Checks compatibility with an old version of sklearn (0.20.3)
14+
compatibility:
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest]
19+
python-version: ['3.6', '3.7', '3.8']
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Run Tests with skggm + scikit-learn 0.20.3
27+
env:
28+
SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8
29+
run: |
30+
sudo apt-get install liblapack-dev
31+
pip install --upgrade pip pytest
32+
pip install wheel cython numpy scipy codecov pytest-cov
33+
pip install scikit-learn==0.20.3
34+
pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION}
35+
pytest test --cov
36+
bash <(curl -s https://codecov.io/bash)
37+
38+
# Run normal testing with the latests versions of all dependencies
39+
build:
40+
runs-on: ${{ matrix.os }}
41+
strategy:
42+
matrix:
43+
os: [ubuntu-latest]
44+
python-version: ['3.6', '3.7', '3.8', '3.9']
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: Set up Python
48+
uses: actions/setup-python@v2
49+
with:
50+
python-version: ${{ matrix.python-version }}
51+
- name: Run Tests without skggm
52+
run: |
53+
sudo apt-get install liblapack-dev
54+
pip install --upgrade pip pytest
55+
pip install wheel cython numpy scipy codecov pytest-cov scikit-learn
56+
pytest test --cov
57+
bash <(curl -s https://codecov.io/bash)
58+
- name: Run Tests with skggm
59+
env:
60+
SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8
61+
run: |
62+
pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION}
63+
pytest test --cov
64+
bash <(curl -s https://codecov.io/bash)
65+
- name: Syntax checking with flake8
66+
run: |
67+
pip install flake8
68+
flake8 --extend-ignore=E111,E114 --show-source;

0 commit comments

Comments
 (0)