Skip to content

Update pytest-cov

Update pytest-cov #198

Workflow file for this run

---
name: CI
"on":
push:
branches:
- master
- devel
pull_request:
env:
# Python 3.12 doesn't work
# since setuptools is no longer installed in venvs.
# Need to wait for Nornir to add it as an explicit dependency.
PYTHON_VERSION: "3.11"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry
- name: Run poetry install
run: poetry install
- name: Build docs
working-directory: ./docs
run: poetry run make html SPHINXOPTS="-n"
test:
strategy:
matrix:
ros_version:
- 7.10.1
# Long-term
- 6.48.6
runs-on: ubuntu-latest
services:
routeros:
image: ghcr.io/devon-mar/docker-routeros:${{ matrix.ros_version }}
ports:
- 2222:22
- 8728:8728
- 8729:8729
volumes:
- /dev/net/tun:/dev/net/tun
options: >-
--cap-add=NET_ADMIN
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry
- name: Setup the router
run: tests/ros_setup.sh
- name: Run poetry install
run: poetry install
- name: Run pytest
run: |
poetry run pytest -vv --cov-report=xml --cov-branch
- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}