Skip to content
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

Feature: CI with GitHub actions #41

Merged
merged 4 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/CI_actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This workflow will setup GitHub-hosted runners and install the required dependencies for viziphant documentation.
# On a pull requests and on pushes to master it will build and create the documentation .

name: Viziphant-tests
# define events that trigger workflow 'Viziphant-tests'
on:
# run on pull requests to master branch
pull_request:
branches: [master]
types: [synchronize, opened, reopened, ready_for_review]

# run on pushes to master branch
push:
#branches: [master]

# jobs define the steps that will be executed on the runner
jobs:

# install dependencies for the documentation and build .html
docs:
runs-on: ${{ matrix.os }}
strategy:

matrix:
# OS [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
# relevant python versions for viziphant: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8]

# do not cancel all in-progress jobs if any matrix job fails
fail-fast: false

steps:

- name: Get current year-month
id: date
run: echo "::set-output name=date::$(date +'%Y-%m')"

- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements files
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-docs.txt') }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/environment.yml') }}-${{ steps.date.outputs.date }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements-docs.txt
pip install -r requirements/requirements.txt
pip install .
conda update conda
conda install -c conda-forge pandoc
# run notebooks
sed -i -E "s/nbsphinx_execute *=.*/nbsphinx_execute = 'always'/g" doc/conf.py
- name: make html
run: |
python --version
cd doc
make html
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Build Status](https://travis-ci.org/INM-6/viziphant.svg?branch=master)](https://travis-ci.org/INM-6/viziphant)
[![Documentation Status](https://readthedocs.org/projects/viziphant/badge/?version=latest)](https://viziphant.readthedocs.io/en/latest/?badge=latest)
[![![PyPi]](https://img.shields.io/pypi/v/viziphant)](https://pypi.org/project/viziphant/)
[![Viziphant-tests](https://github.com/INM-6/viziphant/actions/workflows/CI_actions.yml/badge.svg)](https://github.com/INM-6/viziphant/actions/workflows/CI_actions.yml)

A Python module for easy visualization of [Neo](https://github.com/NeuralEnsemble/python-neo) objects and [Elephant](https://github.com/NeuralEnsemble/elephant) results.

Expand Down