Skip to content

get_config() via API #270

get_config() via API

get_config() via API #270

Workflow file for this run

name: Test, lint, format
on:
push:
branches:
- '**'
tags-ignore:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- $default-branch
workflow_call:
env:
DEFAULT_PY_VERSION: "3.11"
jobs:
Test:
name: Test
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
- name: Set up Python
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
- name: Test
run: >
poetry run
pytest tests
Lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Set up Python
uses: actions/setup-python@v4
id: pysetup
with:
python-version: ${{ env.DEFAULT_PY_VERSION }}
cache: "poetry"
- name: Install Python dependencies
if: steps.pysetup.outputs.cache-hit != 'true'
run: poetry install --no-interaction
- name: Install ruff
run: poetry add --group=dev ruff
- name: Lint
run: >
poetry run
ruff check napalm_ros
Format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Set up Python
uses: actions/setup-python@v4
id: pysetup
with:
python-version: ${{ env.DEFAULT_PY_VERSION }}
cache: "poetry"
- name: Install Python dependencies
if: steps.pysetup.outputs.cache-hit != 'true'
run: poetry install --no-interaction
- name: Format
run: >
poetry run
yapf -dr
napalm_ros
tests