Skip to content

Commit

Permalink
MAINT: Set up github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmainak committed Apr 1, 2021
1 parent fbae7bf commit a63a774
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Python package

on:
push:
branches: ['**']
pull_request:
branches: ['**']
create:
branches: [main]
tags: ['**']
schedule:
- cron: "0 4 * * *"

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
- name: Install HNN
run: |
python setup.py install
- name: Lint with flake8
run: |
flake8 --count hnn_core
- name: Test with pytest
run: |
python -m py.test . --cov=hnn_core hnn_core/tests/ --cov-report=xml

0 comments on commit a63a774

Please sign in to comment.