{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "python: install",
            "detail": "python install requirements",
            "type": "shell",
            "command": "pip install -r hello_world/requirements.txt && pip install -r tests/requirements.txt",
            "problemMatcher": [],
            "options": {
                "cwd": "${workspaceFolder}/{{lambdaFunctionName}}"
            }
        },
        {
            "label": "python: run unit tests",
            "detail": "python run unit tests",
            "type": "shell",
            "command": "pytest tests/unit -v",
            "group": "test",
            "problemMatcher": [],
            "options": {
                "cwd": "${workspaceFolder}/{{lambdaFunctionName}}"
            }
        },
        {
            "label": "python: run integration tests",
            "detail": "python run integration tests",
            "type": "shell",
            "command": "pytest tests/integration -v",
            "group": "test",
            "problemMatcher": [],
            "options": {
                "env": {
                    "AWS_SAM_STACK_NAME": "<stack-name>"
                },
                "cwd": "${workspaceFolder}/{{lambdaFunctionName}}"
            },
        },
        {
            "type": "shell",
            "command": "sam build",
            "label": "sam: build",
            "detail": "sam build",
            "problemMatcher": []
        },
        {
            "type": "shell",
            "command": "sam local invoke {{lambdaFunctionName}}Function --event {{lambdaFunctionName}}/events/event.json",
            "label": "sam: invoke",
            "detail": "sam invoke",
            "problemMatcher": []
        },
        {
            "type": "shell",
            "command": "sam local start-api",
            "label": "sam: start api",
            "detail": "sam start api",
            "isBackground": true,
            "problemMatcher": {
                "pattern": {
                    "regexp": "."
                },
                "background": {
                    "activeOnStart": true,
                    "beginsPattern": ".",
                    "endsPattern": "Running on"
                }
            }
        }
    ]
}
