提交 c324671a 编写于 作者: M munrocket@pm.me

CI: update

上级 4a0dce9d
......@@ -3,10 +3,14 @@ name: CI
on:
pull_request:
paths-ignore:
- 'build/**'
- 'docs/**'
- 'files/**'
push:
paths-ignore:
- 'build/**'
- 'docs/**'
- 'files/**'
jobs:
......@@ -53,7 +57,7 @@ jobs:
key: ${{ runner.os }}-ci-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-ci-${{ env.cache-name }}-
- name: Install packages
run: npm ci
run: npm ci && npm run build-test
- name: === Unit testing ===
run: npm run test-unit
......
......@@ -171,37 +171,6 @@
"dev": true,
"requires": {
"execa": "^0.4.0"
},
"dependencies": {
"execa": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.4.0.tgz",
"integrity": "sha1-TrZGejaglfq7KXD/nV4/t7zm68M=",
"dev": true,
"requires": {
"cross-spawn-async": "^2.1.1",
"is-stream": "^1.1.0",
"npm-run-path": "^1.0.0",
"object-assign": "^4.0.1",
"path-key": "^1.0.0",
"strip-eof": "^1.0.0"
}
},
"npm-run-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-1.0.0.tgz",
"integrity": "sha1-9cMr9ZX+ga6Sfa7FLoL4sACsPI8=",
"dev": true,
"requires": {
"path-key": "^1.0.0"
}
},
"path-key": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-1.0.0.tgz",
"integrity": "sha1-XVPVeAGWRsDWiADbThRua9wqx68=",
"dev": true
}
}
},
"argparse": {
......@@ -969,30 +938,24 @@
"dev": true
},
"execa": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.4.0.tgz",
"integrity": "sha1-TrZGejaglfq7KXD/nV4/t7zm68M=",
"dev": true,
"requires": {
"cross-spawn": "^5.0.1",
"get-stream": "^3.0.0",
"cross-spawn-async": "^2.1.1",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"npm-run-path": "^1.0.0",
"object-assign": "^4.0.1",
"path-key": "^1.0.0",
"strip-eof": "^1.0.0"
},
"dependencies": {
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"dev": true,
"requires": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
"path-key": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-1.0.0.tgz",
"integrity": "sha1-XVPVeAGWRsDWiADbThRua9wqx68=",
"dev": true
}
}
},
......@@ -1411,12 +1374,20 @@
"pxls": "^2.3.1",
"to-array-buffer": "^3.0.0",
"utif": "^2.0.1"
},
"dependencies": {
"pngjs": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
"integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==",
"dev": true
}
}
},
"image-output": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/image-output/-/image-output-2.4.1.tgz",
"integrity": "sha512-Ms9lK9TXBv+x6ACNWF+2eaIXbArG1vQbYNe50LeRnNj1cExdCyekFUMAf5LVsp0nvnnTXJcTie3DrhXJ4AWTaA==",
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/image-output/-/image-output-2.4.2.tgz",
"integrity": "sha512-75e8ZSNydcrb2B/xITCYc3pDR95w7h5hmsdfhwAVgZ2CKRZQ/Tke1J3Sk3K/nCwmit4SCo6vSggYVL6x+FrRtw==",
"dev": true,
"requires": {
"chalk": "^2.4.1",
......@@ -1655,9 +1626,9 @@
}
},
"jpeg-js": {
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.3.6.tgz",
"integrity": "sha512-MUj2XlMB8kpe+8DJUGH/3UJm4XpI8XEgZQ+CiHDeyrGoKPdW/8FJv6ku+3UiYm5Fz3CWaL+iXmD8Q4Ap6aC1Jw==",
"version": "0.3.7",
"resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.3.7.tgz",
"integrity": "sha512-9IXdWudL61npZjvLuVe/ktHiA41iE8qFyLB+4VDTblEsWBzeg8WQTlktdUK4CdncUqtUgUg0bbOmTE2bKBKaBQ==",
"dev": true
},
"js-reporters": {
......@@ -1867,12 +1838,20 @@
}
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-1.0.0.tgz",
"integrity": "sha1-9cMr9ZX+ga6Sfa7FLoL4sACsPI8=",
"dev": true,
"requires": {
"path-key": "^2.0.0"
"path-key": "^1.0.0"
},
"dependencies": {
"path-key": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-1.0.0.tgz",
"integrity": "sha1-XVPVeAGWRsDWiADbThRua9wqx68=",
"dev": true
}
}
},
"object-assign": {
......@@ -2057,12 +2036,20 @@
"dev": true
},
"pixelmatch": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-5.1.0.tgz",
"integrity": "sha512-HqtgvuWN12tBzKJf7jYsc38Ha28Q2NYpmBL9WostEGgDHJqbTLkjydZXL1ZHM02ZnB+Dkwlxo87HBY38kMiD6A==",
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-5.2.0.tgz",
"integrity": "sha512-TdleROuanI+Uo/4PcOAH7b7qgO4kjzJO8K4y/TBAo1wx/5BE8cn1B0I6Jfk3mKcJsGpWvX7zjM8OjU5o9i+aog==",
"dev": true,
"requires": {
"pngjs": "^3.4.0"
"pngjs": "^4.0.1"
},
"dependencies": {
"pngjs": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-4.0.1.tgz",
"integrity": "sha512-rf5+2/ioHeQxR6IxuYNYGFytUyG3lma/WW1nsmjeHlWwtb2aByla6dkVc8pmJ9nplzkTA0q2xx7mMWrOTqT4Gg==",
"dev": true
}
}
},
"plist": {
......@@ -2077,9 +2064,9 @@
}
},
"pngjs": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
"integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==",
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz",
"integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==",
"dev": true
},
"portfinder": {
......@@ -2123,9 +2110,9 @@
"dev": true
},
"proxy-from-env": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
"integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"dev": true
},
"pseudomap": {
......@@ -2678,6 +2665,43 @@
"dev": true,
"requires": {
"execa": "^0.7.0"
},
"dependencies": {
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"dev": true,
"requires": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"execa": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
"dev": true,
"requires": {
"cross-spawn": "^5.0.1",
"get-stream": "^3.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"strip-eof": "^1.0.0"
}
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"dev": true,
"requires": {
"path-key": "^2.0.0"
}
}
}
},
"text-table": {
......
......@@ -4,8 +4,8 @@
Simplify code reviews with quick automated testing inside CI.
### Local usage
If you get an error in e2e test after PR in repo and you sure that all is right, just make a new screenshot.
Sometime you can get wrong results on different GPUs, especially on macbook's. Keep screenshots pack updated for tests.
If you get an error in e2e test after PR and you sure that all is correct,
just make a new screenshot to example. As a last resort add it to exception list or increase timeouts.
```shell
# generate new screenshots for exact examples
......@@ -16,11 +16,10 @@ npm run test-e2e <example1_name> ... <exampleN_name>
# check all examples
npm run test-e2e
# check all examples in browser
npx cross-env VISIBLE=ture npm run test-e2e
```
Merge only those commits that pass the tests, otherwise all next commits will also fail.
### How it works
- ci configs with parallelism
- deterministic random/timer/rAF/video for screenshots
......@@ -39,12 +38,8 @@ npx cross-env VISIBLE=ture npm run test-e2e
| 4=0+0+2+2 failed, time=3:26 | with progressive attempts |
### Status
95% examples are covered with tests. Random robusness in CI >85%. Robustness on different machines ~97%.
For example on integrated GPU you can have additional artifacts: webgl_materials_texture_anisotropy,
webgl_postprocessing_procedural, webgl_shaders_tonemapping.
97% examples are covered with tests. Robusness in CI >97%.
### Wrong screenshots but ok for CI
webgl_loader_bvh, webgl_simple_gi, webgl_postprocessing_dof2, webgl_loader_texture_pvrtc, webgl_physics_volume
### Contribution
You can help with MacOS support.
webgl_loader_bvh, webgl_simple_gi, webgl_postprocessing_dof2, webgl_loader_texture_pvrtc, webgl_physics_volume.
Some of them can be fixed with another [pipeline](https://github.com/munrocket/puppeteer-webgl-ci).
......@@ -5,7 +5,7 @@
( function () {
/* Start VR pages */
/* Remove start screen ( or press some button ) */
let button = document.getElementById( 'startButton' );
if ( button ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册