Skip to content

add api endpoints (#19) #93

add api endpoints (#19)

add api endpoints (#19) #93

Workflow file for this run

name: Lint the projects files
on:
- push
- pull_request
permissions:
contents: read
jobs:
PythonLinting:
name: Python linting
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: nautobot
POSTGRES_DB: nautobot
POSTGRES_PASSWORD: nautobot
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
env:
NAUTOBOT_CONFIG: "/home/runner/work/nautobot-plugin-dns-records/nautobot-plugin-dns-records/development/nautobot_config.py"
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.3.2
- name: Install all dependencies
run: poetry install
- name: Run black (check mode)
run: poetry run black --check nautobot_dns_records
- name: Run pylint
run: poetry run pylint --init-hook "import nautobot; nautobot.setup()" --rcfile pyproject.toml nautobot_dns_records
- name: Run pydocstyle
run: poetry run pydocstyle nautobot_dns_records
- name: Run the tests with coverage
run: poetry run coverage run development/manage.py -c development/nautobot_config.py test
- name: Report coverage
run: poetry run coverage report