Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Run tests on pull requests

Nguyen Xuan An8ffa57ce9980
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 00000000..0d8ec7c4
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,28 @@
+name: Test
+
+on:
+ pull_request:
+
+permissions:
+ contents: read
+
+concurrency:
+ group: test-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ steps:
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
+ - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
+ with:
+ node-version: '24'
+ package-manager-cache: false
+ - run: npm install --global [email protected]
+ - run: npm ci --ignore-scripts
+ - run: npm test
+ - run: npm run prepare:release
+ - run: npm run smoke:package
+ - run: npm run smoke:mcp-package -- --protocol-only
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5b8a7479..a6831b1b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -34,6 +34,8 @@ Run `npm run smoke` or the `smoke:*` script for the area that you changed, and l
A change to skinning, glTF loading, poses or IK also needs `npm run smoke:character`, which takes a real character through the MCP server. Run `npm run prepare:release` first.
Screenshots and other output go to `artifacts/`, which Git ignores.
+Every pull request runs `npm test`, `prepare:release`, `smoke:package` and the protocol part of `smoke:mcp-package` in the `Test` workflow. The checks that need a GPU or look at pixels, such as `smoke:mcp` and `smoke:character`, do not run there, so run them yourself.
+
Do not weaken a test to make it pass. If a test is flaky, find the cause and fix the test or the code.
## Code style