forked from google/model-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP * Start building it up from scratch * Context initializer * Add ThreeDOMElement and test * Add Material, Model and PBRMetallicRoughness * Add in context chunks * Add Three.js facade * Add Github Actions to run tests * Update package-lock.json * Disable IE11, add EventTarget polyfill * Add package-lock updating script * Fix polyfill location, use 'latest'/'latest-1' browsers * Add linting and pre-commit hook * Fix grep * Fix conflict between lint and clang-format * Unbreak pre-commit.sh * Add an integrated demo * End-to-end and context tests * Add a README for 3DOM * Add scene graph mixin and example * Respond to review feedback * Fix example title * Fix EventTarget test in Firefox * Add model-change test * Add issue numbers to TODO comments * Add Scene Graph test suite * Do another release of 3dom * Update scene-graph-spec.ts * Add caching to Github Actions * Remove caching for glTF Sample Models * Increase Mocha timeout * Fix typo in test suite * slightly safer usage of MO * Fix 1006/1007 early * Skip most of suite for now * Add TODO back in
- Loading branch information
Christopher Joel
authored
Feb 11, 2020
1 parent
b2f28f4
commit 539295d
Showing
76 changed files
with
14,111 additions
and
2,302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
**/node_modules | ||
packages/*/dist | ||
packages/**/*.d.ts | ||
packages/*/src/*-css.ts | ||
|
||
packages/*/karma.*.js | ||
|
||
packages/model-viewer/**/* | ||
packages/modelviewer.dev/**/* | ||
packages/render-fidelity-tools/**/* | ||
packages/shared-assets/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
extends: | ||
- eslint:recommended | ||
- plugin:@typescript-eslint/eslint-recommended | ||
- plugin:@typescript-eslint/recommended | ||
- plugin:wc/recommended | ||
globals: | ||
goog: false | ||
env: | ||
browser: true | ||
parser: "@typescript-eslint/parser" | ||
plugins: | ||
- "@typescript-eslint" | ||
- mocha | ||
- wc | ||
parserOptions: | ||
ecmaVersion: 2017 | ||
sourceType: module | ||
settings: | ||
wc: | ||
elementBaseClasses: ["BaseElement", "LitElement", "FormElement"] | ||
rules: | ||
# Rules temporally disabled | ||
"@typescript-eslint/explicit-function-return-type": off | ||
|
||
# Rules disabled in favor of clang-format | ||
"@typescript-eslint/indent": off | ||
indent: off | ||
max-len: off | ||
block-spacing: off | ||
# Remove if we switch away from clang-format: | ||
keyword-spacing: off | ||
|
||
"@typescript-eslint/explicit-member-accessibility": [error, {"accessibility": "no-public"}] | ||
|
||
no-new: warn | ||
quotes: [error, single, {"avoidEscape": true}] | ||
no-var: error | ||
curly: error | ||
no-floating-decimal: error | ||
# tsc handles this for us, and eslint has false positives | ||
no-unused-vars: error | ||
"@typescript-eslint/no-unused-vars": off | ||
|
||
require-jsdoc: off | ||
valid-jsdoc: off | ||
|
||
prefer-const: error | ||
comma-dangle: off | ||
|
||
mocha/handle-done-callback: error | ||
mocha/no-exclusive-tests: error | ||
mocha/no-identical-title: error | ||
mocha/no-nested-tests: error | ||
mocha/no-pending-tests: error | ||
mocha/no-skipped-tests: error | ||
overrides: | ||
- files: ["packages/**/*.ts"] | ||
rules: | ||
no-unused-vars: off | ||
no-invalid-this: off | ||
new-cap: off | ||
- files: ["packages/**/*-spec.ts"] | ||
rules: | ||
"@typescript-eslint/no-non-null-assertion": off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
|
||
- name: Get npm cache directory | ||
id: npm-cache | ||
run: | | ||
echo "::set-output name=dir::$(npm config get cache)" | ||
- name: Cache npm packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.npm-cache.outputs.dir }} | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- name: NPM install | ||
run: npm ci | ||
|
||
- name: Lint TypeScript sources | ||
run: npm run lint | ||
|
||
- name: Bootstrap packages | ||
run: npm run bootstrap | ||
|
||
- name: Build packages | ||
run: npm run build | ||
|
||
- name: Unit tests | ||
env: | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
run: | | ||
# Don't run Sauce from a forked repo, since the code may not be trusted | ||
# and therefore secrets like the Sauce password are not available. | ||
# GITHUB_HEAD_REF is only defined when building a fork. | ||
if [ ! "$GITHUB_HEAD_REF" ]; then | ||
export USE_SAUCE=true | ||
export SAUCE_BUILD_ID=model-viewer-tests-${GITHUB_EVENT_NAME}-${GITHUB_ACTION}-${GITHUB_SHA} | ||
export SAUCE_TUNNEL_ID=${SAUCE_BUILD_ID}-tunnel | ||
fi | ||
npm run test:ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.