Skip to content

Add StrValue.str_of #105

Add StrValue.str_of

Add StrValue.str_of #105

Workflow file for this run

name: Python package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [published]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12"]
steps:
- uses: actions/checkout@v4
- 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 -e .[testing]
- name: Lint with flake8
run: |
flake8 . --count --max-complexity=10 --max-line-length=180 --show-source --statistics
- name: Type check with mypy
run: |
mypy src --strict
- name: Test with pytest
run: |
pytest --cov --cov-fail-under=95
publish:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'release'
permissions:
id-token: write # Required for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Build package
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1