Merge branch 'main' into rich_dev_24 #140
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: interval-test | |
on: [ push ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
python-version: [ '3.10', '3.11' ] | |
steps: | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- 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 flake8 pytest pytest-cov | |
pip install -r requirements.txt | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# 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 | |
- name: Test with pytest | |
run: | | |
python -m pytest --cov visualizations --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report term-missing --cov-report=html | |
python -m pytest --cov main_objs --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report term-missing --cov-report=html | |
- name: Install poetry and "patch" the build | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry self add poetry-bumpversion | |
poetry version patch | |
- name: Publish to Pypi | |
if: ${{ matrix.python-version == 3.9 }} | |
run: | | |
poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}" | |
poetry publish --build | |
- uses: actions/checkout@v4 | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
# - name: Build and publish to PyPI | |
# env: | |
# TWINE_USERNAME: __token__ # Replace with your PyPI username or token | |
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} # Add this token as a GitHub repository secret | |
# run: | | |
# poetry build | |
# twine upload ./crim_intervals |