Skip to content

[FIX] close #340 and #355 #747

[FIX] close #340 and #355

[FIX] close #340 and #355 #747

name: Python Unit Tests
on:
push:
branches:
- master
pull_request:
jobs:
unittests:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
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
shell: bash
run: |
[[ -z $(git remote show origin | grep "Fetch URL:" | grep [email protected]:MICA-MNI/BrainStat.git) ]] && git config remote.upstream.fetch refs/heads/*:refs/remotes/upstream/* || git config remote.origin.fetch refs/heads/*:refs/origin/upstream/*
git fetch origin test-data-2.0
python -m pip install -e .[dev]
- name: Test with pytest
shell: bash
run: |
python3 -m pytest
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Dependencies
shell: bash
run: |
python -m pip install -e .[dev]
python -m pip install numpy==1.21.5
- name: Test with mypy
shell: bash
run: |
python3 -m mypy $(find brainstat -path "*tests*" -prune -false -o -name "*.py")
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: psf/black@stable
with:
black_args: ". --check"