Skip to content

Commit 33e53fe

Browse files
Copilotpelikhan
andcommitted
Add full install script test without dummy version
Added a new test step that runs the full installation script without a dummy version number to test the complete installation flow. This step: - Downloads the latest release from GitHub - Installs the binary to the expected location - Verifies the binary exists and is executable - Tests the version and help commands work correctly The test runs on all supported platforms (Ubuntu, macOS, Windows) after the platform detection test. Reference: https://github.com/githubnext/gh-aw/actions/runs/20134752288/job/57788102877 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent 584ed45 commit 33e53fe

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/install.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,62 @@ jobs:
107107
retention-days: 7
108108
if-no-files-found: ignore
109109

110+
- name: Test full install script (without dummy version)
111+
shell: bash
112+
run: |
113+
chmod +x install-gh-aw.sh
114+
115+
# Run the full installation script without version to get latest release
116+
echo "Running full installation script to test complete flow..."
117+
./install-gh-aw.sh
118+
119+
# Verify the installation worked
120+
INSTALL_DIR="$HOME/.local/share/gh/extensions/gh-aw"
121+
122+
# Determine expected binary name based on OS
123+
if [[ "$RUNNER_OS" == "Windows" ]]; then
124+
BINARY_NAME="gh-aw.exe"
125+
else
126+
BINARY_NAME="gh-aw"
127+
fi
128+
129+
BINARY_PATH="$INSTALL_DIR/$BINARY_NAME"
130+
131+
# Check if binary exists
132+
if [ ! -f "$BINARY_PATH" ]; then
133+
echo "❌ Binary not found at $BINARY_PATH"
134+
exit 1
135+
fi
136+
137+
echo "✅ Binary found at $BINARY_PATH"
138+
139+
# Check if binary is executable
140+
if [ ! -x "$BINARY_PATH" ]; then
141+
echo "❌ Binary is not executable"
142+
exit 1
143+
fi
144+
145+
echo "✅ Binary is executable"
146+
147+
# Run version command to verify binary works
148+
if "$BINARY_PATH" version; then
149+
echo "✅ Binary version command works"
150+
else
151+
echo "❌ Binary version command failed"
152+
exit 1
153+
fi
154+
155+
# Run help command to verify binary works
156+
if "$BINARY_PATH" --help > /dev/null 2>&1; then
157+
echo "✅ Binary help command works"
158+
else
159+
echo "❌ Binary help command failed"
160+
exit 1
161+
fi
162+
163+
echo ""
164+
echo "✅ Full installation test passed!"
165+
110166
report-failure:
111167
name: Report Installation Failures
112168
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)