Skip to content

Commit

Permalink
Pull request target (#113)
Browse files Browse the repository at this point in the history
Revised github actions
  • Loading branch information
espenhgn authored Nov 30, 2020
1 parent 3eae706 commit 88eb71c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 6 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Coveralls

on:
pull_request:
branches: [ master ]
pull_request_target:
types: [ opened ]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]

steps:
- uses: actions/checkout@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python 3
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 wheel coverage pytest-cov coveralls
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [[ "${{ matrix.python-version }}" < "3.9" ]]; then pip install neuron; fi
pip install .
- name: Test with pytest and coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
py.test -v --cov=lfpykit/tests/
coveralls
9 changes: 3 additions & 6 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# This workflow will install Python dependencies, run tests and lint with a multiple versions of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python application
Expand Down Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest wheel coverage pytest-cov coveralls
pip install flake8 pytest wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [[ "${{ matrix.python-version }}" < "3.9" ]]; then pip install neuron; fi
pip install .
Expand All @@ -38,8 +38,5 @@ jobs:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
py.test -v --cov=lfpykit/tests/
coveralls
py.test -v

0 comments on commit 88eb71c

Please sign in to comment.