Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit a97ce6c

Browse files
authored
migrate to GitHub Actions (#179)
* migrate to GitHub Actions * fail test * Revert "fail test" This reverts commit 340aa6a. * simplify installation process * master branch
1 parent 4cf9dd7 commit a97ce6c

File tree

6 files changed

+72
-100
lines changed

6 files changed

+72
-100
lines changed

.github/workflows/gh_pages.yml

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
- name: Install package
2121
run: |
2222
pip install -r requirements_build.txt
23-
python setup.py build
2423
python setup.py install
2524
- name: Build docs
2625
run: |

.github/workflows/main.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Package tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
name: ${{ matrix.os }}, Python ${{ matrix.python_version }} (${{ matrix.python_arch }})
14+
runs-on: ${{ matrix.os }}
15+
timeout-minutes: 30
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os:
20+
- ubuntu-latest
21+
- macos-latest
22+
- windows-latest
23+
python_version:
24+
- '3.6'
25+
- '3.7'
26+
- '3.8'
27+
- '3.9'
28+
python_arch:
29+
- x64
30+
include:
31+
- os: windows-latest
32+
python_version: '3.6'
33+
python_arch: x86
34+
- os: windows-latest
35+
python_version: '3.7'
36+
python_arch: x86
37+
- os: windows-latest
38+
python_version: '3.8'
39+
python_arch: x86
40+
- os: windows-latest
41+
python_version: '3.9'
42+
python_arch: x86
43+
steps:
44+
- name: Checkout repository
45+
uses: actions/checkout@v2
46+
with:
47+
fetch-depth: 3
48+
- name: Install Python
49+
uses: actions/setup-python@v2
50+
with:
51+
python-version: ${{ matrix.python_version }}
52+
architecture: ${{ matrix.python_arch }}
53+
- name: Check Python version
54+
shell: python
55+
run: |
56+
import struct
57+
import sys
58+
59+
assert sys.version_info[:2] == tuple(map(int, "${{ matrix.python_version }}".split(".")))
60+
assert f"x{struct.calcsize('P') * 8}".replace("32", "86") == "${{ matrix.python_arch }}"
61+
- name: Install package
62+
run: |
63+
python -m pip install --upgrade pip
64+
pip install -r requirements_build.txt -r requirements_test.txt
65+
python setup.py install
66+
- name: Run tests
67+
run: pytest -v --pyargs lightning

.travis.yml

-25
This file was deleted.

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
include MANIFEST.in
22
include Makefile
3+
include requirements*.txt
34
recursive-include lightning *.c *.h *.cpp *.pyx *.pxd

README.rst

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
.. -*- mode: rst -*-
22
3-
.. image:: https://travis-ci.org/scikit-learn-contrib/lightning.svg?branch=master
4-
:target: https://travis-ci.org/scikit-learn-contrib/lightning
5-
6-
.. image:: https://ci.appveyor.com/api/projects/status/mmm0llccmvn5iooq?svg=true
7-
:target: https://ci.appveyor.com/project/fabianp/lightning/branch/master
3+
.. image:: https://github.com/scikit-learn-contrib/lightning/actions/workflows/main.yml/badge.svg?branch=master
4+
:target: https://github.com/scikit-learn-contrib/lightning/actions/workflows/main.yml
85

96
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.200504.svg
107
:target: https://doi.org/10.5281/zenodo.200504
@@ -66,7 +63,7 @@ penalty on the News20 dataset (c.f., `Blondel et al. 2013
6663
Dependencies
6764
------------
6865

69-
lightning requires Python >= 3.6, setuptools, Numpy >= 1.12, SciPy >= 0.19 and
66+
lightning requires Python >= 3.6, setuptools, Joblib, Numpy >= 1.12, SciPy >= 0.19 and
7067
scikit-learn >= 0.19. Building from source also requires Cython and a working C/C++ compiler. To run the tests you will also need pytest.
7168

7269
Installation
@@ -90,8 +87,7 @@ The development version of lightning can be installed from its git repository. I
9087
9188
git clone https://github.com/scikit-learn-contrib/lightning.git
9289
cd lightning
93-
python setup.py build
94-
sudo python setup.py install
90+
python setup.py install
9591
9692
Documentation
9793
-------------

appveyor.yml

-66
This file was deleted.

0 commit comments

Comments
 (0)