Skip to content

release

release #69

Workflow file for this run

name: test
permissions:
contents: read
on:
- pull_request
- push
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
env:
POETRY_VERSION: 1.7.0
- name: Add Poetry to path
run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH
- name: Set up Python ${{ matrix.version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}
cache: "poetry"
- name: Install Poetry Packages
run: |
poetry env use ${{ matrix.version }}
poetry install --only dev
- name: Add venv to path
run: echo `poetry env info --path`/bin/ >> $GITHUB_PATH
- run: ruff check --output-format github .
- run: ruff format --check .
- run: mypy --check-untyped-defs .
- run: pyright --warnings .
- run: pytest -s --cov=iter_pipes --cov-report=html
- uses: actions/upload-artifact@v3
with:
name: code-coverage
path: htmlcov/
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
release:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/iter-pipes
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
env:
POETRY_VERSION: 1.7.0
- name: Add Poetry to path
run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "poetry"
- name: Install Poetry Packages
run: |
poetry env use "3.11"
poetry install --only dev
- run: echo `poetry env info --path`/bin/ >> $GITHUB_PATH
- run: poetry build
- uses: pypa/gh-action-pypi-publish@release/v1