Skip to content

Lussac v2.0 b6

Lussac v2.0 b6 #186

# 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: Lussac unit tests (Linux)
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -e .[dev]
pip install git+https://github.com/SpikeInterface/spikeinterface.git
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --ignore=W191,E501 --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Cache datasets
id: cache-datasets
uses: actions/cache@v3
with:
path: tests/datasets
key: ${{ runner.os }}-datasets
- name: Test with pytest
run: |
pytest --cov
coverage xml
- name: Upload coverage report to codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: tests/coverage.xml
flags: unittests
env_vars: OS,PYTHON
verbose: true