Skip to content

Commit 15820e5

Browse files
committed
Separate verification from test scripts.
Make lint, typecheck, and build explicit CI steps while keeping npm test as the standard entrypoint by delegating it to the Playwright suite. Made-with: Cursor
1 parent 311d060 commit 15820e5

8 files changed

Lines changed: 28 additions & 19 deletions

File tree

.github/workflows/ui-tests.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: UI Tests
1+
name: CI
22

33
on:
44
push:
@@ -8,7 +8,7 @@ permissions:
88
contents: read
99

1010
jobs:
11-
playwright:
11+
verify:
1212
runs-on: macos-14
1313

1414
steps:
@@ -28,11 +28,17 @@ jobs:
2828
- name: Install dependencies
2929
run: npm ci
3030

31-
- name: Run project verification
32-
run: npm test
31+
- name: Run ESLint
32+
run: npm run lint
33+
34+
- name: Run TypeScript typecheck
35+
run: npm run typecheck
36+
37+
- name: Build distributable assets
38+
run: npm run build
3339

3440
- name: Run Playwright UI tests
35-
run: npm run test:ui
41+
run: npm test
3642
env:
3743
CHROME_PATH: ${{ steps.chrome.outputs.chrome-path }}
3844

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Remember the script's core philosophy is to stay simple and minimal, doing one t
1818

1919
## Before you open a pull request
2020
- Follow Git best practices (especially use meaningful commit messages).
21-
- Run `npm test` and `npm run test:ui`.
21+
- Run `npm run lint`, `npm run typecheck`, `npm run build`, and `npm test`.
2222
- Describe thoroughly your work in a PR comment.
2323
- Be patient and understanding. It's a side project, done in free time.
2424

@@ -32,9 +32,10 @@ Compatible node version: v22
3232

3333
Build the script
3434
```sh
35+
npm run lint
36+
npm run typecheck
3537
npm run build
3638
npm test
37-
npm run test:ui
3839
git add --update
3940
git commit -m "Build update"
4041
```

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,28 +267,30 @@ The repository includes the legacy Gulp build, standalone linting, strict TypeSc
267267
### Run the full local verification flow
268268

269269
```sh
270+
npm run lint
271+
npm run typecheck
272+
npm run build
270273
npm test
271274
```
272275

273-
This runs:
274-
- `npm run build`
275-
- `npm run lint`
276-
- `npm run typecheck`
276+
`npm test` now delegates to `npm run test:ui`. Build, lint, and typecheck are intentionally separate commands.
277277

278278
### Run the UI test suite
279279

280280
```sh
281281
npm run test:ui
282282
```
283283

284-
This rebuilds the distributable assets first, then runs Playwright against the packaged minified CSS and JS files.
284+
This runs the Playwright suite against the packaged minified CSS and JS files. Run `npm run build` first if you want the tests to reflect fresh source changes.
285285

286286
### Update snapshot baselines
287287

288288
```sh
289289
npm run test:ui:update
290290
```
291291

292+
Run `npm run build` first so snapshot updates match the current built assets.
293+
292294
Notes:
293295
- The Playwright config uses the local Google Chrome browser on macOS.
294296
- Snapshot files live in `tests/ui/smoke.spec.js-snapshots/`.

dist/baguetteBox.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* baguetteBox.js
33
* @author feimosi
4-
* @version %%INJECT_VERSION%%
4+
* @version 1.13.0
55
* @url https://github.com/feimosi/baguetteBox.js
66
*/
77

dist/baguetteBox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*!
33
* baguetteBox.js
44
* @author feimosi
5-
* @version %%INJECT_VERSION%%
5+
* @version 1.13.0
66
* @url https://github.com/feimosi/baguetteBox.js
77
*/
88
(function (root, factory) {

dist/baguetteBox.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/baguetteBox.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"start": "gulp",
2323
"lint": "eslint src/**/*.ts gulpfile.js playwright.config.js eslint.config.js tests/**/*.js",
2424
"typecheck": "tsc --project tsconfig.json",
25-
"test": "npm run build && npm run lint && npm run typecheck",
26-
"test:ui": "npm run build && playwright test",
27-
"test:ui:update": "npm run build && playwright test --update-snapshots",
25+
"test": "npm run test:ui",
26+
"test:ui": "playwright test",
27+
"test:ui:update": "playwright test --update-snapshots",
2828
"build": "gulp build",
2929
"release": "gulp release",
3030
"patch": "gulp patch"

0 commit comments

Comments
 (0)