Skip to content

YML file: CI Migration to Github Actions #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 16, 2021
68 changes: 68 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

# Checks compatibility with an old version of sklearn (0.20.3)
compatibility:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.6', '3.7', '3.8']
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run Tests with skggm + scikit-learn 0.20.3
env:
SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8
run: |
sudo apt-get install liblapack-dev
pip install --upgrade pip pytest
pip install wheel cython numpy scipy codecov pytest-cov
pip install scikit-learn==0.20.3
pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION}
pytest test --cov
bash <(curl -s https://codecov.io/bash)

# Run normal testing with the latests versions of all dependencies
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.6', '3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run Tests without skggm
run: |
sudo apt-get install liblapack-dev
pip install --upgrade pip pytest
pip install wheel cython numpy scipy codecov pytest-cov scikit-learn
pytest test --cov
bash <(curl -s https://codecov.io/bash)
- name: Run Tests with skggm
env:
SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8
run: |
pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION}
pytest test --cov
bash <(curl -s https://codecov.io/bash)
- name: Syntax checking with flake8
run: |
pip install flake8
flake8 --extend-ignore=E111,E114 --show-source;