Skip to content

Move to poetry

Move to poetry #241

Workflow file for this run

name: CI
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v4
id: pysetup
with:
python-version: ${{ matrix.python_version }}
cache: "poetry"
- name: Install Python dependencies
if: steps.pysetup.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Lint
run: poetry run pylint napalm_ros
- name: Format
run: >
poetry run
yapf -dr
napalm_ros
tests
- name: Unit tests
run: poetry run pytest tests
- name: Publish
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.python_version == '3.7'
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.pypi_password }}
run: poetry publish --build