diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2677de9b7..491e4d950 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ on: # yamllint disable-line rule:truthy rule:comments pull_request: ~ env: - PLUGIN_NAME: "nautobot-plugin-ssot" + PLUGIN_NAME: "nautobot-ssot" jobs: black: diff --git a/development/docker-compose.mysql.yml b/development/docker-compose.mysql.yml index c7fa6a1fb..5896cddf2 100644 --- a/development/docker-compose.mysql.yml +++ b/development/docker-compose.mysql.yml @@ -19,7 +19,7 @@ services: db: image: "mysql:8" command: - - "--default-authentication-plugin=mysql_native_password" + - "--max_connections=1000" env_file: - "development.env" - "creds.env" diff --git a/tasks.py b/tasks.py index 4bae04d6d..2a969cdd0 100644 --- a/tasks.py +++ b/tasks.py @@ -16,12 +16,19 @@ from invoke import Collection, task as invoke_task import os -from dotenv import load_dotenv +try: + from dotenv import load_dotenv + + HAS_DOTENV = True +except ImportError: + HAS_DOTENV = False def _load_dotenv(): - load_dotenv("./development/development.env") - load_dotenv("./development/creds.env") + """Load environment variables from .env file.""" + if HAS_DOTENV: + load_dotenv("./development/development.env") + load_dotenv("./development/creds.env") def is_truthy(arg): @@ -609,7 +616,7 @@ def yamllint(context): @task def check_migrations(context): """Check for missing migrations.""" - command = "nautobot-server --config=nautobot/core/tests/nautobot_config.py makemigrations --dry-run --check" + command = "nautobot-server makemigrations --dry-run --check" run_command(context, command) @@ -623,7 +630,14 @@ def check_migrations(context): "pattern": "Run specific test methods, classes, or modules instead of all tests", } ) -def unittest(context, keepdb=False, label="nautobot_ssot", failfast=False, buffer=True, pattern=""): +def unittest( + context, + keepdb=False, + label="nautobot_ssot", + failfast=False, + buffer=True, + pattern="", +): """Run Nautobot unit tests.""" command = f"coverage run --module nautobot.core.cli test {label}"