Skip to content

Commit f13b5ed

Browse files
ci: add shellcheck and installer args smoke test
- Add shellcheck job to lint installer scripts - Add installer-args job to smoke test --help, --version, unknown arg handling - Fix shellcheck SC1090 warnings in status.sh and smoke-test.sh (move directive immediately before source command) Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
1 parent 59d4743 commit f13b5ed

3 files changed

Lines changed: 39 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,43 @@ jobs:
6464
- name: Syntax-check MCP sources
6565
run: find mcp -name '*.js' -not -path '*/node_modules/*' -print0 | xargs -0 -n1 node --check
6666

67+
shellcheck:
68+
name: shellcheck (installer scripts)
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@v7
72+
- name: Install shellcheck
73+
run: sudo apt-get update && sudo apt-get install -y shellcheck
74+
- name: Lint installer scripts
75+
run: |
76+
shellcheck --severity=warning \
77+
scripts/self-host/install.sh \
78+
scripts/self-host/remote-install.sh \
79+
scripts/self-host/bootstrap-server.sh \
80+
scripts/self-host/uninstall.sh \
81+
scripts/self-host/status.sh \
82+
scripts/self-host/smoke-test.sh
83+
84+
installer-args:
85+
name: installer args smoke test
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v7
89+
- name: install.sh --help exits 0
90+
run: ./scripts/self-host/install.sh --help
91+
- name: install.sh --version exits 0
92+
run: ./scripts/self-host/install.sh --version
93+
- name: remote-install.sh --help exits 0
94+
run: ./scripts/self-host/remote-install.sh --help
95+
- name: remote-install.sh --version exits 0
96+
run: ./scripts/self-host/remote-install.sh --version
97+
- name: Unknown arg exits non-zero
98+
run: |
99+
if ./scripts/self-host/install.sh --unknown-arg 2>/dev/null; then
100+
echo "Expected non-zero exit for unknown arg"
101+
exit 1
102+
fi
103+
67104
compose-build:
68105
name: docker compose build
69106
runs-on: ubuntu-latest

‎scripts/self-host/smoke-test.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ if [[ ! -f "$ENV_FILE" ]]; then
1212
exit 1
1313
fi
1414

15-
# shellcheck disable=SC1090
1615
set -a
16+
# shellcheck disable=SC1090
1717
source "$ENV_FILE"
1818
set +a
1919

‎scripts/self-host/status.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ compose() {
1616
}
1717

1818
if [[ -f "$ENV_FILE" ]]; then
19-
# shellcheck disable=SC1090
2019
set -a
20+
# shellcheck disable=SC1090
2121
source "$ENV_FILE"
2222
set +a
2323
fi

0 commit comments

Comments
 (0)