Skip to content

πŸ”€ Merge pull request #158 from SaaShup/add_refresh_host_operation #86

πŸ”€ Merge pull request #158 from SaaShup/add_refresh_host_operation

πŸ”€ Merge pull request #158 from SaaShup/add_refresh_host_operation #86

Workflow file for this run

name: main branch CI
on:
push:
branches:
- "main"
jobs:
testing:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.11"]
netbox-version: ["v4.0.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
uses: actions/checkout@v3
with:
path: netbox-docker-plugin
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout netbox ${{ matrix.netbox-version }}
uses: actions/checkout@v3
with:
repository: "netbox-community/netbox"
ref: ${{ matrix.netbox-version }}
path: netbox
- name: Install netbox_docker_plugin Dependencies
working-directory: netbox-docker-plugin
run: |
pip install .
pip install requests_mock
- name: Install netbox Dependencies
working-directory: netbox
run: |
ln -s $(pwd)/../netbox-docker-plugin/netbox_configuration/configuration_testing.py netbox/netbox/configuration.py
python -m pip install --upgrade pip
pip install -r requirements.txt -U
- name: Run Pylint
run: |
pip install pylint
pylint --rcfile $(pwd)/netbox-docker-plugin/.pylintrc --init-hook 'import os; import sys; sys.path.append(os.getcwd() + "/netbox/netbox")' $(pwd)/netbox-docker-plugin/netbox_docker_plugin/
- name: Run tests
working-directory: netbox
run: |
netbox/manage.py test netbox_docker_plugin.tests -v 2