Skip to content

Modernize package configuration and update test workflow file #29

Modernize package configuration and update test workflow file

Modernize package configuration and update test workflow file #29

Workflow file for this run

name: Run tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
name: Set up Python ${{ matrix.python-version }}
steps:
- name: Checkout source
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dev environment & flexitext
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
pip install .
pip install .[dev]
pip freeze
- name: Run linters
shell: bash -l {0}
run: |
python -m black -l 100 flexitext --check
echo "Success!"
echo "Checking code style with pylint..."
python -m pylint flexitext/
- name: Run tests
shell: bash -l {0}
run: |
python -m pytest -vv --cov=flexitext --cov-report=term --cov-report=xml flexitext/tests
env:
PYTHON_VERSION: ${{ matrix.python-version }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false