Skip to content

Commit

Permalink
Set up basic Circle CI configuration (cruise-automation#2)
Browse files Browse the repository at this point in the history
With linting and testing for now. Tightened the linter a bit to not even
allow warnings, and fixed the one warning that we had.
  • Loading branch information
janpaul123 authored Dec 11, 2018
1 parent 15d9485 commit d12d971
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
37 changes: 37 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# See https://circleci.com/docs/2.0/language-javascript/
version: 2
jobs:
build:
docker:
- image: circleci/node:11-browsers

steps:
- checkout

- restore_cache:
keys:
- global-deps-{{ checksum "package-lock.json" }}
- global-deps-

- restore_cache:
keys:
- regl-worldview-deps-{{ checksum "package-lock.json" }}
- regl-worldview-deps-

- run: npm run bootstrap

- save_cache:
paths: ["node_modules"]
key: global-deps-{{ checksum "package-lock.json" }}

- save_cache:
paths: ["packages/regl-worldview/node_modules"]
key: regl-worldview-deps-{{ checksum "packages/regl-worldview/package-lock.json" }}

- run:
name: "npm run lint"
command: npm run lint

- run:
name: "npm test"
command: npm test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"bootstrap": "npm install && lerna exec npm install",
"build": "lerna run build",
"clean": "lerna run clean",
"lint": "eslint packages",
"lint": "eslint packages --max-warnings=0",
"lint:fix": "eslint packages --fix",
"test": "lerna run test",
"link": "lerna link --force-local",
Expand Down
4 changes: 2 additions & 2 deletions packages/regl-worldview/src/utils/eulerFromQuaternion.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const scratch = [0, 0, 0, 0, 0, 0, 0, 0, 0];
export default function eulerFromQuaternion(out: number[], q: Vec4): Vec3 {
const m = mat3.fromQuat(scratch, q);
const m11 = m[0], m12 = m[3], m13 = m[6]; // prettier-ignore
const m21 = m[1], m22 = m[4], m23 = m[7]; // prettier-ignore
const m31 = m[2], m32 = m[5], m33 = m[8]; // prettier-ignore
const m22 = m[4], m23 = m[7]; // prettier-ignore
const m32 = m[5], m33 = m[8]; // prettier-ignore

out[1] = Math.asin(m13 < -1 ? -1 : m13 > 1 ? 1 : m13);
if (Math.abs(m13) < 0.99999) {
Expand Down

0 comments on commit d12d971

Please sign in to comment.