@@ -2,15 +2,15 @@ name: CI
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [main]
66 pull_request :
7- branches : [ main ]
7+ branches : [main]
88 workflow_dispatch :
99
1010jobs :
1111 test :
1212 runs-on : ${{ matrix.os }}
13-
13+
1414 strategy :
1515 fail-fast : false
1616 matrix :
@@ -19,59 +19,59 @@ jobs:
1919 os : [ubuntu-latest, macos-latest]
2020
2121 steps :
22- - name : Checkout repository
23- uses : actions/checkout@v4
24-
25- - name : Setup Node.js ${{ matrix.node-version }}
26- uses : actions/setup-node @v4
27- with :
28- node-version : ${{ matrix.node- version }}
29- cache : ' pnpm '
30-
31- - name : Install pnpm
32- uses : pnpm/action- setup@v4
33- with :
34- version : 10.11.0
35- run_install : false
36-
37- - name : Install dependencies
38- run : pnpm install --frozen-lockfile
39-
40- - name : Run linting
41- run : pnpm lint
42-
43- - name : Check code formatting
44- run : pnpm exec prettier --check --ignore-path .gitignore .
45-
46- - name : Build project
47- run : pnpm build
48-
49- - name : Verify build output
50- run : |
51- if [ ! -f "dist/bvm.js" ]; then
52- echo "❌ Expected build output dist/bvm.js not found"
53- echo "Available files in dist/:"
54- ls -la dist/ || echo "dist/ directory not found"
55- exit 1
56- fi
57- echo "✅ Build output verified: bvm.ts → bvm.js"
58-
59- - name : Run CLI smoke tests
60- run : |
61- chmod +x dist/bvm.js
62-
63- echo "Testing bvm --help command..."
64- node dist/bvm.js --help
65-
66- echo "Testing bvm --version command..."
67- node dist/bvm.js --version
68-
69- echo "Testing error handling with invalid command..."
70- if node dist/bvm.js invalid-command-test 2>/dev/null; then
71- echo "❌ CLI should return error for invalid commands"
72- exit 1
73- else
74- echo "✅ CLI properly handles invalid commands"
75- fi
76-
77- echo "✅ All smoke tests completed successfully"
22+ - name : Checkout repository
23+ uses : actions/checkout@v4
24+
25+ - name : Install pnpm
26+ uses : pnpm/action-setup @v4
27+ with :
28+ version : 10.11.0
29+ run_install : false
30+
31+ - name : Setup Node.js ${{ matrix.node-version }}
32+ uses : actions/ setup-node @v4
33+ with :
34+ node- version : ${{ matrix.node-version }}
35+ cache : ' pnpm '
36+
37+ - name : Install dependencies
38+ run : pnpm install --frozen-lockfile
39+
40+ - name : Run linting
41+ run : pnpm lint
42+
43+ - name : Check code formatting
44+ run : pnpm exec prettier --check --ignore-path .gitignore .
45+
46+ - name : Build project
47+ run : pnpm build
48+
49+ - name : Verify build output
50+ run : |
51+ if [ ! -f "dist/bvm.js" ]; then
52+ echo "❌ Expected build output dist/bvm.js not found"
53+ echo "Available files in dist/:"
54+ ls -la dist/ || echo "dist/ directory not found"
55+ exit 1
56+ fi
57+ echo "✅ Build output verified: bvm.ts → bvm.js"
58+
59+ - name : Run CLI smoke tests
60+ run : |
61+ chmod +x dist/bvm.js
62+
63+ echo "Testing bvm --help command..."
64+ node dist/bvm.js --help
65+
66+ echo "Testing bvm --version command..."
67+ node dist/bvm.js --version
68+
69+ echo "Testing error handling with invalid command..."
70+ if node dist/bvm.js invalid-command-test 2>/dev/null; then
71+ echo "❌ CLI should return error for invalid commands"
72+ exit 1
73+ else
74+ echo "✅ CLI properly handles invalid commands"
75+ fi
76+
77+ echo "✅ All smoke tests completed successfully"
0 commit comments