{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Run Tests",
            "type": "shell",
            "command": "poetry",
            "args": ["run", "pytest"],
            "group": {
                "kind": "test",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",
                "panel": "dedicated"
            },
            "problemMatcher": []
        },
        {
            "label": "Run Tests with Coverage",
            "type": "shell",
            "command": "poetry",
            "args": [
                "run",
                "pytest",
                "--cov=souschef",
                "--cov-report=term-missing",
                "--cov-report=html"
            ],
            "group": "test",
            "presentation": {
                "reveal": "always",
                "panel": "dedicated"
            },
            "problemMatcher": []
        },
        {
            "label": "Lint (Ruff)",
            "type": "shell",
            "command": "poetry",
            "args": ["run", "ruff", "check", "."],
            "group": "build",
            "presentation": {
                "reveal": "always",
                "panel": "shared"
            },
            "problemMatcher": []
        },
        {
            "label": "Format (Ruff)",
            "type": "shell",
            "command": "poetry",
            "args": ["run", "ruff", "format", "."],
            "group": "build",
            "presentation": {
                "reveal": "silent",
                "panel": "shared"
            },
            "problemMatcher": []
        },
        {
            "label": "Lint & Test",
            "dependsOn": ["Lint (Ruff)", "Run Tests"],
            "dependsOrder": "sequence",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": []
        },
        {
            "label": "Serve Documentation",
            "type": "shell",
            "command": "poetry",
            "args": ["run", "mkdocs", "serve", "-a", "127.0.0.1:8000"],
            "options": {
                "env": {
                    "MKDOCS_SITE_URL": ""
                }
            },
            "isBackground": true,
            "presentation": {
                "reveal": "always",
                "panel": "dedicated",
                "focus": false
            },
            "problemMatcher": []
        },
        {
            "label": "Run Go Tests (terraform-provider)",
            "type": "shell",
            "command": "cd",
            "args": [
                "terraform-provider",
                "&&",
                "[",
                "-f",
                ".env.test",
                "]",
                "||",
                "cp",
                ".env.test.example",
                ".env.test",
                "&&",
                "go",
                "test",
                "-v",
                "./..."
            ],
            "options": {
                "env": {
                    "TF_ACC": "1"
                }
            },
            "group": "test",
            "presentation": {
                "reveal": "always",
                "panel": "dedicated"
            },
            "problemMatcher": []
        },
        {
            "label": "Run Go Tests with Coverage (terraform-provider)",
            "type": "shell",
            "command": "cd",
            "args": [
                "terraform-provider",
                "&&",
                "[",
                "-f",
                ".env.test",
                "]",
                "||",
                "cp",
                ".env.test.example",
                ".env.test",
                "&&",
                "go",
                "test",
                "-v",
                "-cover",
                "-coverprofile=coverage.out",
                "./...",
                "&&",
                "go",
                "tool",
                "cover",
                "-html=coverage.out",
                "-o",
                "coverage.html"
            ],
            "options": {
                "env": {
                    "TF_ACC": "1"
                }
            },
            "group": "test",
            "presentation": {
                "reveal": "always",
                "panel": "dedicated"
            },
            "problemMatcher": []
        },
        {
            "label": "Go Mod Tidy (terraform-provider)",
            "type": "shell",
            "command": "cd",
            "args": [
                "terraform-provider",
                "&&",
                "go",
                "mod",
                "tidy"
            ],
            "group": "build",
            "presentation": {
                "reveal": "silent",
                "panel": "shared"
            },
            "problemMatcher": []
        },
        {
            "label": "Setup Go Test Environment",
            "type": "shell",
            "command": "cd",
            "args": [
                "terraform-provider",
                "&&",
                "[",
                "-f",
                ".env.test",
                "]",
                "||",
                "cp",
                ".env.test.example",
                ".env.test"
            ],
            "presentation": {
                "reveal": "silent",
                "panel": "shared"
            },
            "problemMatcher": []
        },
        {
            "label": "Regenerate Go Test Results",
            "type": "shell",
            "command": "./terraform-provider/regenerate-tests.sh",
            "group": "build",
            "presentation": {
                "reveal": "always",
                "panel": "dedicated"
            },
            "problemMatcher": []
        }
    ]
}
