Skip to content

Merge pull request #209 from ArnesSI/asset-search #421

Merge pull request #209 from ArnesSI/asset-search

Merge pull request #209 from ArnesSI/asset-search #421

Workflow file for this run

name: Run tests under netbox
on: [push]
jobs:
test-netbox:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
netbox-version: ["v4.1.7"]
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: Checkout repo
uses: actions/checkout@v4
with:
path: netbox-inventory
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Checkout netbox ${{ matrix.netbox-version }}
uses: actions/checkout@v4
with:
repository: "netbox-community/netbox"
ref: ${{ matrix.netbox-version }}
path: netbox
- name: install netbox_inventory
working-directory: netbox-inventory
run: |
pip install .
- name: Install dependencies & set up configuration
working-directory: netbox
run: |
ln -s $(pwd)/../netbox-inventory/testing/configuration.testing.py netbox/netbox/configuration.py
python -m pip install --upgrade pip
pip install -r requirements.txt -U
- name: Run tests
working-directory: netbox
run: |
python netbox/manage.py test netbox_inventory.tests -v 2