Skip to content

ci: Limit test to one file to debug codecov issue. #27

ci: Limit test to one file to debug codecov issue.

ci: Limit test to one file to debug codecov issue. #27

Workflow file for this run

name: Unit tests
on:
push:
branches: ['**']
pull_request:
branches: ['**']
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
python-version: ${{ matrix.python-version }}
fetch-depth: 2
- name: Install ubuntu dependencies
shell: bash -el {0}
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install libopenmpi-dev openmpi-bin
fi;
- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
conda install --yes -c conda-forge mpi4py openmpi
- name: Install HNN-core
shell: bash -el {0}
run: |
pip install --verbose '.[opt, parallel, test, gui]'
- name: Lint with flake8
shell: bash -el {0}
run: |
flake8 --count hnn_core
- name: Test with pytest
shell: bash -el {0}
run: |
python -m pytest ./hnn_core/tests/test_io.py --cov=hnn_core hnn_core/tests/test_io.py --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
directory: ./
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}