Skip to content

Commit 9441f7f

Browse files
committed
update workflow, DEVELOPING.md, add cypress to scripts
1 parent c7d115d commit 9441f7f

File tree

4 files changed

+97
-81
lines changed

4 files changed

+97
-81
lines changed

.github/workflows/development.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,22 @@ jobs:
117117
- name: Run unit tests
118118
run: tox -e test-unit -- -m "smoke or sanity"
119119

120+
ui-unit-tests:
121+
permissions:
122+
contents: "read"
123+
runs-on: ubuntu-latest
124+
steps:
125+
- name: Check out code
126+
uses: actions/checkout@v3
127+
128+
- name: Install dependencies
129+
run: npm ci
130+
working-directory: src/ui
131+
132+
- name: Run unit tests
133+
run: npm run test-unit
134+
working-directory: src/ui
135+
120136
integration-tests:
121137
runs-on: ubuntu-latest
122138
strategy:
@@ -133,6 +149,22 @@ jobs:
133149
- name: Run integration tests
134150
run: tox -e test-integration -- -m smoke
135151

152+
ui-integration-tests:
153+
permissions:
154+
contents: "read"
155+
runs-on: ubuntu-latest
156+
steps:
157+
- name: Check out code
158+
uses: actions/checkout@v3
159+
160+
- name: Install dependencies
161+
run: npm ci
162+
working-directory: src/ui
163+
164+
- name: Run integration tests
165+
run: npm run test-integration
166+
working-directory: src/ui
167+
136168
build:
137169
runs-on: ubuntu-latest
138170
strategy:

.github/workflows/ui-development.yml

Lines changed: 0 additions & 79 deletions
This file was deleted.

DEVELOPING.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,68 @@ Review the coverage report to confirm that your new code is adequately tested.
179179

180180
3. **Address Feedback**: Respond to any feedback from reviewers and make necessary changes.
181181

182+
## Developing the Web UI
183+
184+
The GuideLLM project includes a frontend UI located in `src/ui`, built using [Next.js](https://nextjs.org/). This section provides instructions for working on the UI.
185+
186+
### Getting Started
187+
188+
To start the local development server:
189+
190+
```bash
191+
npm run dev
192+
```
193+
194+
Then open [http://localhost:3000](http://localhost:3000) in your browser.
195+
196+
### Building for Production
197+
198+
To build the app for production (output in the `out` directory):
199+
200+
```bash
201+
npm run build
202+
```
203+
204+
### Running UI Tests
205+
206+
- **Unit tests**:
207+
208+
```bash
209+
npm run test:unit
210+
```
211+
212+
- **Integration tests**:
213+
214+
```bash
215+
npm run test:integration
216+
```
217+
218+
- **End-to-end tests** (using Cypress, ensure live dev server):
219+
220+
```bash
221+
npm run test:e2e
222+
```
223+
224+
### Code Quality and Styling
225+
226+
- **Fix styling issues**:
227+
228+
```bash
229+
npm run format
230+
```
231+
232+
- **Run ESLint checks**:
233+
234+
```bash
235+
npm run lint
236+
```
237+
238+
- **Run TS type checks**:
239+
240+
```bash
241+
npm run type-checks
242+
```
243+
182244
## Additional Resources
183245

184246
- [CONTRIBUTING.md](https://github.com/neuralmagic/guidellm/blob/main/CONTRIBUTING.md): Guidelines for contributing to the project.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,20 @@
1111
"prepare": "husky install",
1212
"test": "jest --config src/ui/jest.config.js --passWithNoTests src/ui",
1313
"test:unit": "jest --config src/ui/jest.config.js --passWithNoTests src/ui/tests/unit",
14-
"test:integration": "jest --config src/ui/jest.config.js --passWithNoTests src/ui/tests/integration"
14+
"test:integration": "jest --config src/ui/jest.config.js --passWithNoTests src/ui/tests/integration",
15+
"test:e2e": "cypress run --project src/ui --headless"
1516
},
1617
"dependencies": {
1718
"next": "15.3.2",
1819
"react": "^18.2.0",
1920
"react-dom": "^18.2.0"
2021
},
2122
"devDependencies": {
23+
"@eslint/eslintrc": "^3",
2224
"@testing-library/jest-dom": "^5.16.5",
2325
"@testing-library/react": "^16.0.0",
2426
"@testing-library/user-event": "^13.5.0",
2527
"@types/jest": "^27.5.2",
26-
"@eslint/eslintrc": "^3",
2728
"@types/node": "^22",
2829
"@types/react": "^18.0.28",
2930
"@types/react-dom": "^18.0.11",

0 commit comments

Comments
 (0)