Skip to content

bug fix

bug fix #66

Workflow file for this run

name: CI
on:
push :
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
branches:
- main
jobs:
check-black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- id: file_changes
uses: Ana06/get-changed-files@v1.2
- name: check black
env:
CHANGED_FILES: ${{ steps.file_changes.outputs.added_modified }}
run: bash ./scripts/black.sh
lint-flake-8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude .git,__pycache__,docs/source/conf.py,old,build,dist,tests/
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude .git,__pycache__,docs/source/conf.py,old,build,dist,tests/
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest psutil
python -m pip install .[test]
# python -m pip install codecov pytest-cov
- name: Run tests
run: |
pytest -v -s