Skip to content

Commit

Permalink
Merge pull request #50 from BiomedSciAI/migrate-to-github-actions
Browse files Browse the repository at this point in the history
Migrate to GitHub actions
  • Loading branch information
ehudkr committed Dec 21, 2022
2 parents 30ab9b1 + ed100e6 commit d07ecda
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 28 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build

on: [push, pull_request]

jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false # Don't cancel entire run if one python-version fails
matrix:
python-version: ["3.7", "3.8", "3.9"]
name: Build and test on Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# cache: 'pip'
# cache-dependency-path: setup.py

- name: Install and upgrade latest CI dependencies
run: |
pip install --upgrade pip
pip install --upgrade pytest coverage # pytest-cov
pip install --upgrade importlib-metadata # Solves a python 3.7 install bug: https://app.travis-ci.com/github/IBM/causallib/jobs/566048347
- name: Install local causallib
run: |
pip install .
pip install .[contrib] # Optional requirements for contrib module
- name: Show environment's final dependencies
run: pip freeze --all

- name: Test with pytest
run: |
coverage run --source=. --omit=*__init__.py,setup.py -m pytest
coverage xml
# pytest tests.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
- name: Publish to CodeClimate
uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_REPORTER_ID }}

24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Travis (.com) branch](https://img.shields.io/travis/com/IBM/causallib/master?logo=travis)](https://app.travis-ci.com/IBM/causallib)
[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/IBM/causallib?logo=codeclimate)](https://codeclimate.com/github/IBM/causallib/test_coverage)
[![CI Status](https://github.com/IBM/causallib/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/IBM/causallib/actions/workflows/build.yml)
[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/BiomedSciAI/causallib?logo=codeclimate)](https://codeclimate.com/github/BiomedSciAI/causallib/test_coverage)
[![PyPI](https://img.shields.io/pypi/v/causallib?color=blue&logo=pypi&logoColor=yellow)](https://badge.fury.io/py/causallib)
[![Documentation Status](https://readthedocs.org/projects/causallib/badge/?version=latest)](https://causallib.readthedocs.io/en/latest/)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/IBM/causallib/HEAD)
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pandas>=0.25.2,<2
scipy>=0.19,<2
statsmodels>=0.9,<1
networkx>=1.1,<3
numpy>=1.13,<2
scikit-learn>=0.20,<2
numpy>=1.13,<1.24
scikit-learn>=0.20,<1.2
matplotlib>=2.2,<4
dataclasses>=0.8;python_version < '3.7'

0 comments on commit d07ecda

Please sign in to comment.