Skip to content

Update docs requirements #69

Update docs requirements

Update docs requirements #69

Workflow file for this run

on: push
name: Continuous Integration
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Compile
run: |
sudo apt install libboost-filesystem-dev libboost-system-dev
pip install --upgrade pip
git submodule update --init
pip install -e .
- name: Tests
run: |
pip install pytest pytest-cov
pytest tests -r a --cov=pyhector --cov-report=''
- name: Linters
run: |
pip install flake8 pylint
flake8 pyhector tests setup.py
pylint --fail-under=9.5 pyhector
- name: Formatting
run: |
pip install black isort
black --check pyhector tests setup.py --exclude pyhector/_version.py
isort --check-only --quiet --recursive pyhector tests setup.py
- name: Coverage
env:
MIN_COVERAGE: "75"
run: |
pip install coverage
if ! coverage report --fail-under="$MIN_COVERAGE" --show-missing
then
echo
echo "Error: Test coverage has to be at least ${MIN_COVERAGE}%"
exit 1
fi
deploy-pypi:
needs: test
if: startsWith(github.event.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Create source distribution
run: |
pip install pybind11
python setup.py sdist
- name: Publish package to PyPI
# pypi-publish releases:
# https://github.com/pypa/gh-action-pypi-publish/releases
uses: pypa/gh-action-pypi-publish@a56da0b891b3dc519c7ee3284aff1fad93cc8598
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}