editor/VSCode/tasks.json

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "windows": {
        "options": {
            "shell": {
                "executable": "C:/Program Files/PowerShell/7-preview/pwsh.exe",
                "args": [ "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command" ]
            }
        }
    },
    "linux": {
        "options": {
            "shell": {
                "executable": "/usr/bin/pwsh",
                "args": [ "-NoProfile", "-Command" ]
            }
        }
    },
    "osx": {
        "options": {
            "shell": {
                "executable": "/usr/local/bin/pwsh",
                "args": [ "-NoProfile", "-Command" ]
            }
        }
    },
    "tasks": [
        {
            "label": "1. Run tests (Pester)",
            "type": "shell",
            "group": "test",
            "command": "Invoke-Pester -Script test -PesterOption @{IncludeVSCodeMarker=$true}",
            "problemMatcher": [ "$pester" ]
        },
        {
            "label": "2. Build package",
            "type": "shell",
            "group": "build",
            "command": "$env:psmodulepath = $env:psmodulepath+';${workspaceFolder}/Modules'; New-GuestConfigurationPackage -Name ${workspaceFolderBasename} -Configuration '${workspaceFolder}/${workspaceFolderBasename}.mof' -Path '${workspaceFolder}/package' -Verbose",
            "problemMatcher": [ "$pester" ]

        },
        {
            "label": "3. Test package",
            "type": "shell",
            "group": "test",
            "command": "Test-GuestConfigurationPackage -Path '${workspaceFolder}/package/${workspaceFolderBasename}/${workspaceFolderBasename}.zip' -Verbose | fl *",
            "problemMatcher": [ "$pester" ]

        }
    ]
}