Skip to content

Fix PyPi

Fix PyPi #29

Workflow file for this run

name: CI
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
env:
NETBOX_CONFIGURATION: netbox.configuration_testing
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
services:
redis:
image: redis
ports:
- 6379:6379
postgres:
image: postgres
env:
POSTGRES_USER: netbox
POSTGRES_PASSWORD: netbox
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Check out NetBox
uses: actions/checkout@v4
with:
repository: netbox-community/netbox
ref: master
path: netbox
- name: Check out repo
uses: actions/checkout@v4
with:
path: netbox-routing
- name: Install dependencies & set up configuration
run: |
python -m pip install --upgrade pip
pip install -r netbox/requirements.txt
pip install pycodestyle coverage tblib
pip install -e netbox-routing
cp -f netbox-routing/.github/configuration.testing.py netbox/netbox/netbox/configuration_testing.py
- name: Run tests
run: coverage run --source="netbox-routing/netbox_routing" netbox/netbox/manage.py test netbox-routing/netbox_routing --parallel
- name: Show coverage report
run: coverage report --skip-covered --omit '*/migrations/*,*/tests/*'