mirror of
https://github.com/aaddrick/claude-desktop-debian.git
synced 2026-05-17 00:26:21 +03:00
fix: address PR #338 review feedback
- Remove workflow_dispatch trigger (no artifacts on manual dispatch) - Add nodejs npm to Ubuntu test dependencies - Add explicit permissions: contents: read to workflow - Replace echo|grep with [[ ]] pattern matching (4 instances) - Drop ambiguous 2>&1 from install commands - Use (( ++ )) arithmetic style in test helpers
This commit is contained in:
6
.github/workflows/test-artifacts.yml
vendored
6
.github/workflows/test-artifacts.yml
vendored
@@ -2,7 +2,9 @@ name: Test Build Artifacts (Reusable)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test-artifact:
|
||||
@@ -42,7 +44,7 @@ jobs:
|
||||
if: matrix.format != 'rpm'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y file libfuse2
|
||||
sudo apt-get install -y file libfuse2 nodejs npm
|
||||
|
||||
- name: Run artifact tests
|
||||
run: |
|
||||
|
||||
@@ -6,12 +6,12 @@ _fail_count=0
|
||||
|
||||
pass() {
|
||||
printf '[PASS] %s\n' "$*"
|
||||
_pass_count=$((_pass_count + 1))
|
||||
((_pass_count++))
|
||||
}
|
||||
|
||||
fail() {
|
||||
printf '[FAIL] %s\n' "$*" >&2
|
||||
_fail_count=$((_fail_count + 1))
|
||||
((_fail_count++))
|
||||
}
|
||||
|
||||
assert_file_exists() {
|
||||
|
||||
@@ -17,19 +17,19 @@ pass "Found deb: $(basename "$deb_file")"
|
||||
# --- Package metadata ---
|
||||
pkg_info=$(dpkg-deb -I "$deb_file")
|
||||
|
||||
if echo "$pkg_info" | grep -q 'Package: claude-desktop'; then
|
||||
if [[ $pkg_info == *'Package: claude-desktop'* ]]; then
|
||||
pass "Package name is claude-desktop"
|
||||
else
|
||||
fail "Package name is not claude-desktop"
|
||||
fi
|
||||
|
||||
if echo "$pkg_info" | grep -q 'Architecture: amd64'; then
|
||||
if [[ $pkg_info == *'Architecture: amd64'* ]]; then
|
||||
pass "Architecture is amd64"
|
||||
else
|
||||
fail "Architecture is not amd64"
|
||||
fi
|
||||
|
||||
if echo "$pkg_info" | grep -q 'Version:'; then
|
||||
if [[ $pkg_info == *'Version:'* ]]; then
|
||||
pass "Version field present"
|
||||
else
|
||||
fail "Version field missing"
|
||||
@@ -37,7 +37,7 @@ fi
|
||||
|
||||
# --- Install the package ---
|
||||
# Use --force-depends since we only care about file placement
|
||||
if sudo dpkg -i --force-depends "$deb_file" 2>&1; then
|
||||
if sudo dpkg -i --force-depends "$deb_file"; then
|
||||
pass "dpkg -i succeeded"
|
||||
else
|
||||
fail "dpkg -i failed"
|
||||
|
||||
@@ -17,14 +17,14 @@ pass "Found rpm: $(basename "$rpm_file")"
|
||||
# --- RPM metadata ---
|
||||
rpm_info=$(rpm -qip "$rpm_file" 2>/dev/null)
|
||||
|
||||
if echo "$rpm_info" | grep -q 'Name.*claude-desktop'; then
|
||||
if [[ $rpm_info =~ Name.*claude-desktop ]]; then
|
||||
pass "Package name is claude-desktop"
|
||||
else
|
||||
fail "Package name is not claude-desktop"
|
||||
fi
|
||||
|
||||
# --- Install ---
|
||||
if rpm -ivh --nodeps "$rpm_file" 2>&1; then
|
||||
if rpm -ivh --nodeps "$rpm_file"; then
|
||||
pass "rpm -ivh succeeded"
|
||||
else
|
||||
fail "rpm -ivh failed"
|
||||
|
||||
Reference in New Issue
Block a user