diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ab96992 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run lint + - run: npm run benchmark + - run: npm run test + - run: npm run build + - run: npm run build-demo diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fdb6065..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -sudo: false -node_js: - - "node" -install: - - npm ci -script: - - npm run lint - - npm run benchmark - - npm run test - - npm run build - - npm run build-demo \ No newline at end of file diff --git a/README.md b/README.md index 732f8f4..16840c9 100644 --- a/README.md +++ b/README.md @@ -124,9 +124,13 @@ Alternatively you can download a [stable release](https://github.com/liabru/matt -### Webpack +### Performance with other tools (e.g. Webpack, Vue etc.) -Some [webpack](https://webpack.js.org/) configs including the default may impact your project's performance during development, for a solution see [issue](https://github.com/liabru/matter-js/issues/1001). +Bundlers and frameworks may reduce real-time performance when using their default configs, especially in development modes. + +When using [Webpack](https://webpack.js.org/), the default sourcemap config can have a large impact, for a solution see [issue](https://github.com/liabru/matter-js/issues/1001). + +When using [Vue.js](https://vuejs.org/), watchers can have a large impact, for a solution see [issue](https://github.com/liabru/matter-js/issues/1001#issuecomment-998911435). ### Usage diff --git a/test/Examples.spec.js b/test/Examples.spec.js index fd30ca9..72899a1 100644 --- a/test/Examples.spec.js +++ b/test/Examples.spec.js @@ -1,7 +1,7 @@ /* eslint-env es6 */ "use strict"; -jest.setTimeout(30 * 1000); +jest.setTimeout(2 * 60 * 1000); const fs = require('fs'); @@ -41,7 +41,7 @@ const captureExamples = async useDev => { const overlapRuns = await Promise.all(examples.map(name => multiThreadWorker.runExample({ name, useDev, - updates: 1, + updates: 2, stableSort: true, jitter: excludeJitter.includes(name) ? 0 : 1e-10 })));