-
Notifications
You must be signed in to change notification settings - Fork 200
142 lines (124 loc) · 4.6 KB
/
Copy pathtest-installer-scripts.yml
File metadata and controls
142 lines (124 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Test Installer Scripts
on:
push:
paths:
- 'scripts/install.sh'
- 'scripts/install-macos.sh'
- 'scripts/install-linux.sh'
- 'scripts/install-windows.ps1'
- '.github/workflows/test-installer-scripts.yml'
pull_request:
paths:
- 'scripts/install.sh'
- 'scripts/install-macos.sh'
- 'scripts/install-linux.sh'
- 'scripts/install-windows.ps1'
- '.github/workflows/test-installer-scripts.yml'
schedule:
- cron: '0 21 * * *' # Daily at 4pm Eastern
workflow_dispatch:
permissions:
contents: read
jobs:
test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Run macOS installer script (first run)
run: sh scripts/install.sh
- name: Run macOS installer script (second run - idempotency test)
run: |
# Should skip uv install and show "uv is already installed"
sh scripts/install.sh
- name: Verify uv is installed
run: |
command -v uvx || (echo "uvx not found" && exit 1)
uvx --version
- name: Verify Claude Desktop config was created
run: |
CONFIG_FILE="$HOME/Library/Application Support/Claude/claude_desktop_config.json"
if [ ! -f "$CONFIG_FILE" ]; then
echo "Config file not created"
exit 1
fi
cat "$CONFIG_FILE"
# Verify it contains Home Assistant config
grep -q '"Home Assistant"' "$CONFIG_FILE" || (echo "Home Assistant config not found" && exit 1)
grep -q 'ha-mcp@latest' "$CONFIG_FILE" || (echo "ha-mcp not configured" && exit 1)
test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Run Linux installer script (first run)
run: sh scripts/install.sh
- name: Run Linux installer script (second run - idempotency test)
run: |
# Should skip uv install and show "uv is already installed"
sh scripts/install.sh
- name: Verify uv is installed
run: |
export PATH="$HOME/.local/bin:$PATH"
command -v uvx || (echo "uvx not found" && exit 1)
uvx --version
- name: Verify Claude Desktop config was created
run: |
CONFIG_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/Claude/claude_desktop_config.json"
if [ ! -f "$CONFIG_FILE" ]; then
echo "Config file not created"
exit 1
fi
cat "$CONFIG_FILE"
# Verify it contains Home Assistant config
grep -q '"Home Assistant"' "$CONFIG_FILE" || (echo "Home Assistant config not found" && exit 1)
grep -q 'ha-mcp@latest' "$CONFIG_FILE" || (echo "ha-mcp not configured" && exit 1)
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Run Windows installer script (first run)
shell: pwsh
run: |
& ./scripts/install-windows.ps1
- name: Run Windows installer script (second run - idempotency test)
shell: pwsh
run: |
# Should skip uv install and show "uv is already installed"
& ./scripts/install-windows.ps1
- name: Verify uv is installed
shell: pwsh
run: |
# Refresh PATH (winget installs to user PATH which doesn't persist between steps)
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
$uvx = Get-Command uvx -ErrorAction SilentlyContinue
if (-not $uvx) {
Write-Error "uvx not found"
exit 1
}
uvx --version
- name: Verify Claude Desktop config was created
shell: pwsh
run: |
$ConfigFile = "$env:APPDATA\Claude\claude_desktop_config.json"
if (-not (Test-Path $ConfigFile)) {
Write-Error "Config file not created"
exit 1
}
Get-Content $ConfigFile
# Verify it contains Home Assistant config
$content = Get-Content $ConfigFile -Raw
if ($content -notmatch '"Home Assistant"') {
Write-Error "Home Assistant config not found"
exit 1
}
if ($content -notmatch 'ha-mcp@latest') {
Write-Error "ha-mcp not configured"
exit 1
}
check-demo-env:
runs-on: ubuntu-latest
steps:
- name: Check demo environment is up
run: |
# Verify the demo Home Assistant server is responding
curl -sf "https://ha-mcp-demo-server.qc-h.net/" -o /dev/null
echo "Demo server is up and responding"