Skip to content

Update/workshop 2024 #104

Update/workshop 2024

Update/workshop 2024 #104

name: Unit Tests
on:
pull_request:
branches:
- develop
- release/**
paths:
- bmtk/**
- .github/workflows/**
jobs:
run-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Requirements
run: |
pip install -r test_requirements.txt
pip install neuron==8.0.0
pip install .
- name: Check NRN mechanisms directory exists
id: has_mechanisms_dir
uses: andstor/file-existence-action@v1
with:
files: bmtk/tests/simulator/bionet/components/mechanisms
- name: Setup NEURON
if: steps.has_mechanisms_dir.outputs.files_exists == 'true'
run: |
cd bmtk/tests/simulator/bionet/components/mechanisms
nrnivmodl modfiles
- name: Run Tests
run: |
pytest --cov=bmtk --cov-report=html bmtk/tests
linter:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Requirements
run: |
pip install -r test_requirements.txt
- name: Run Python Linter
run: |
flake8 bmtk --exit-zero --statistics --count