Skip to content

style: format code with black #3

style: format code with black

style: format code with black #3

Workflow file for this run

name: CI
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-cov pytest-xdist
- name: Run unit tests
run: |
pytest tests/test_character.py tests/test_memory.py tests/test_system.py -v
- name: Upload coverage reports
uses: codecov/codecov-action@v3
if: matrix.os == 'ubuntu-latest'
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install linting tools
run: |
python -m pip install --upgrade pip
pip install black flake8 mypy
- name: Check code formatting with black
run: black --check personaflow tests
- name: Lint with flake8
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 personaflow --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings
flake8 personaflow --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Type check with mypy
run: mypy personaflow --ignore-missing-imports
continue-on-error: true