Introduce experimental IPAM-DNS coupling feature #155
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: Test NetBox Latest | |
on: [push, pull_request] | |
jobs: | |
test-netbox-latest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
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@v3 | |
with: | |
path: netbox-plugin-dns | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout netbox | |
uses: actions/checkout@v3 | |
with: | |
repository: "netbox-community/netbox" | |
path: netbox | |
ref: master | |
- name: install netbox_dns | |
working-directory: netbox-plugin-dns | |
run: | | |
# include tests directory for test | |
sed -i 's/exclude/#exclude/g' pyproject.toml | |
pip install . | |
- name: Install dependencies & set up configuration | |
working-directory: netbox | |
run: | | |
ln -s $(pwd)/../netbox-plugin-dns/media/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_dns.tests -v 2 |