update python version #97
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: 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: "${{ github.workspace }}/development/nautobot_config.py" | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.10 | |
- 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 |