Skip to content

🗃️ Add max_size field to Volume model #210

🗃️ Add max_size field to Volume model

🗃️ Add max_size field to Volume model #210

Workflow file for this run

name: Pull Request CI
on:
pull_request:
branches:
- "main"
jobs:
testing:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
strategy:
max-parallel: 4
matrix:
python-version: ["3.11"]
netbox-version: ["v4.1.0"]
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: Checkout netbox ${{ matrix.netbox-version }}
uses: actions/checkout@v3
with:
repository: "netbox-community/netbox"
ref: ${{ matrix.netbox-version }}
path: netbox
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- 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 with coverage and edit coverage report
working-directory: netbox
run: |
python3 -m pip install coverage
coverage run --include='*/netbox_docker_plugin/*' netbox/manage.py test netbox_docker_plugin.tests -v 2
coverage report -m
coverage xml -o coverage.xml
- name: Get Cover
uses: orgoro/[email protected]
with:
coverageFile: netbox/coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
thresholdAll: 0.9
thresholdNew: 0.9
thresholdModified: 0.9
passIcon: "✅"
failIcon: "❌"