Skip to content

Merge pull request #91 from ShunsukeOnoo/fix-feature-extractor #135

Merge pull request #91 from ShunsukeOnoo/fix-feature-extractor

Merge pull request #91 from ShunsukeOnoo/fix-feature-extractor #135

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: ci
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lint with ruff
uses: chartboost/ruff-action@v1
type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install mypy mypy-gh-action-report
pip install .[all]
- name: Static type check with mypy
run: |
mypy . | mypy-gh-action-report
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov pytest-github-actions-annotate-failures
pip install .[dev]
# https://stackoverflow.com/questions/985876/tee-and-exit-status
- name: Test with pytest
run: |
(
set -o pipefail
pytest --junitxml=pytest.yml \
--cov-report=term-missing:skip-covered --cov=bdpy tests | tee pytest-coverage.txt
)
- name: Upload coverage comment
if: always()
uses: MishaKav/pytest-coverage-comment@v1.1.47
with:
pytest-coverage-path: pytest-coverage.txt
junitxml-path: pytest.yml