Skip to content

Commit deb7e51

Browse files
committed
feat: add fresh user experience test to all three CI platforms
Simulates a real user's first install → use flow: mcpp new hello → cd hello → mcpp build → mcpp run Runs in a clean temp directory with no pre-existing config. Verifies the output contains "Hello from hello".
1 parent 8da0622 commit deb7e51

3 files changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/ci-macos.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,20 @@ jobs:
306306
"$MCPP" toolchain default llvm@20.1.7
307307
bash tests/e2e/run_all.sh
308308
309+
- name: Fresh user experience (mcpp new → build → run)
310+
run: |
311+
MCPP=$(find target -path "*/bin/mcpp" | head -1)
312+
MCPP=$(cd "$(dirname "$MCPP")" && pwd)/$(basename "$MCPP")
313+
FRESH=$(mktemp -d)
314+
cd "$FRESH"
315+
"$MCPP" new hello
316+
cd hello
317+
"$MCPP" build
318+
out=$("$MCPP" run 2>&1)
319+
echo "$out"
320+
echo "$out" | grep -q "Hello from hello" || { echo "FAIL: unexpected output"; exit 1; }
321+
echo ":: Fresh user experience PASS"
322+
309323
- name: Self-host smoke (freshly-built mcpp builds itself again)
310324
run: |
311325
MCPP=$(find target -path "*/bin/mcpp" | head -1)

.github/workflows/ci-windows.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,20 @@ jobs:
100100
"$MCPP_SELF" toolchain default llvm@20.1.7 2>/dev/null || true
101101
bash tests/e2e/run_all.sh
102102
103+
- name: Fresh user experience (mcpp new → build → run)
104+
shell: bash
105+
run: |
106+
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
107+
FRESH=$(mktemp -d)
108+
cd "$FRESH"
109+
"$MCPP_SELF" new hello
110+
cd hello
111+
"$MCPP_SELF" build
112+
out=$("$MCPP_SELF" run 2>&1)
113+
echo "$out"
114+
echo "$out" | grep -q "Hello from hello" || { echo "FAIL: unexpected output"; exit 1; }
115+
echo ":: Fresh user experience PASS"
116+
103117
- name: Self-host smoke (freshly-built mcpp builds itself again)
104118
shell: bash
105119
run: |

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,19 @@ jobs:
128128
"$MCPP" toolchain default gcc@16.1.0
129129
bash tests/e2e/run_all.sh
130130
131+
- name: Fresh user experience (mcpp new → build → run)
132+
run: |
133+
MCPP=$(realpath "$(find target -type f -name mcpp -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2)")
134+
FRESH=$(mktemp -d)
135+
cd "$FRESH"
136+
"$MCPP" new hello
137+
cd hello
138+
"$MCPP" build
139+
out=$("$MCPP" run 2>&1)
140+
echo "$out"
141+
echo "$out" | grep -q "Hello from hello" || { echo "FAIL: unexpected output"; exit 1; }
142+
echo ":: Fresh user experience PASS"
143+
131144
- name: Self-host smoke (freshly-built mcpp builds itself again)
132145
run: |
133146
MCPP=$(realpath "$(find target -type f -name mcpp -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2)")

0 commit comments

Comments
 (0)