File tree Expand file tree Collapse file tree 3 files changed +83
-0
lines changed
Expand file tree Collapse file tree 3 files changed +83
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ push :
5+ branches : [ main, master ]
6+ pull_request :
7+ branches : [ main, master ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Setup Node.js
18+ uses : actions/setup-node@v4
19+ with :
20+ node-version : ' 20.x'
21+ cache : ' npm'
22+
23+ - name : Install dependencies
24+ run : npm ci
25+
26+ - name : Build TypeScript
27+ run : npm run build
28+
29+ - name : Check if build outputs exist
30+ run : |
31+ test -f dist/index.js || (echo "dist/index.js not found" && exit 1)
32+ test -f dist/vi-editor.js || (echo "dist/vi-editor.js not found" && exit 1)
33+ test -f dist/example-files.js || (echo "dist/example-files.js not found" && exit 1)
34+ test -f dist/index.d.ts || (echo "dist/index.d.ts not found" && exit 1)
35+ echo "All build outputs present!"
Original file line number Diff line number Diff line change 1+ name : Tests
2+
3+ on :
4+ push :
5+ branches : [ main, master ]
6+ pull_request :
7+ branches : [ main, master ]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+
13+ strategy :
14+ matrix :
15+ node-version : [18.x, 20.x, 22.x]
16+
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+
21+ - name : Setup Node.js ${{ matrix.node-version }}
22+ uses : actions/setup-node@v4
23+ with :
24+ node-version : ${{ matrix.node-version }}
25+ cache : ' npm'
26+
27+ - name : Install dependencies
28+ run : npm ci
29+
30+ - name : Run tests
31+ run : npm test
32+
33+ - name : Run tests with coverage
34+ if : matrix.node-version == '20.x'
35+ run : npm run test:coverage
36+
37+ - name : Upload coverage to Codecov
38+ if : matrix.node-version == '20.x'
39+ uses : codecov/codecov-action@v3
40+ with :
41+ files : ./coverage/lcov.info
42+ flags : unittests
43+ name : codecov-umbrella
44+ fail_ci_if_error : false
Original file line number Diff line number Diff line change 11# Unix Shell JS
22
3+ [ ![ Tests] ( https://github.com/hypexr/unix-shell-js/actions/workflows/test.yml/badge.svg )] ( https://github.com/hypexr/unix-shell-js/actions/workflows/test.yml )
4+ [ ![ Build] ( https://github.com/hypexr/unix-shell-js/actions/workflows/build.yml/badge.svg )] ( https://github.com/hypexr/unix-shell-js/actions/workflows/build.yml )
5+ [ ![ npm version] ( https://badge.fury.io/js/unix-shell-js.svg )] ( https://www.npmjs.com/package/unix-shell-js )
6+
37A browser-based Unix/Linux command emulator with vi editor support.
48
59** [ Try the Live Demo] ( https://hypexr.github.io/unix-shell-js/ ) **
You can’t perform that action at this time.
0 commit comments