feat: diode-napalm-agent #26
Workflow file for this run
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: diode-napalm-agent - lint and tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- "diode-napalm-agent/**" | |
push: | |
branches: | |
- "!release" | |
paths: | |
- "diode-napalm-agent/**" | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ "3.9", "3.10", "3.11", "3.12" ] | |
defaults: | |
run: | |
working-directory: diode-napalm-agent | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip install .[dev] | |
pip install .[test] | |
- name: Run tests with coverage | |
run: | | |
set -o pipefail | |
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=diode_napalm/ | tee pytest-coverage.txt | |
- name: Pytest coverage comment | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-coverage-path: ./pytest-coverage.txt | |
junitxml-path: ./pytest.xml | |
- name: Lint with Ruff | |
run: | | |
ruff --output-format=github diode_napalm/ tests/ | |
continue-on-error: true |