Skip to content

Commit

Permalink
feat: initial versions of *.schema.json files and tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Feb 18, 2019
1 parent 66c0f21 commit eb71029
Show file tree
Hide file tree
Showing 15 changed files with 812 additions and 123 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/.vscode/.ropeproject
/node_modules
/ts
59 changes: 2 additions & 57 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,2 @@
dist: trusty
sudo: required
matrix:
include:

# Node.js latest LTS
- language: node_js
node_js: 10

# Require apt packages
before_install:
- sudo apt-get install libsecret-1-dev

install:
- make setup-js

# Do linting, coverage, and build docs (to upload to Github pages)
script:
- make lint-js
- make cover-js
- make build-js

# Upload test coverage to codecov
after_success:
- bash <(curl -s https://codecov.io/bash) -cF ts

# Prevent Github Pages from using Jekyll
# (which causes Typedoc generated files starting with undescores to be ignored)
before_deploy:
- touch js/build/.nojekyll

deploy:
# Deploy a new version of NPM package and create a Github release
- provider: script
skip_cleanup: true
script:
- cd js && npm run semantic-release

# Deploy documentation to Github Pages
# See https://docs.travis-ci.com/user/deployment/pages/
- provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local-dir: js/build
on:
branch: master

# Node.js previous LTS
- language: node_js
node_js: 8

install:
- make setup-js

# Just do testing
script:
- make test-js
language: node_js
node_js: 10
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"autoDocstring.docstringFormat": "sphinx",
"python.pythonPath": "/usr/bin/python3"
"yaml.schemas": {
"./schema/Environment.schema.json": "*.environ.yaml",
"./schema/Session.schema.json": "*.session.yaml"
}
}
76 changes: 13 additions & 63 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,71 +1,21 @@
all: setup lint test cover build docs
all: setup build docs

# Setup the local development environment
setup:
npm install

setup: setup-js
# Check schema is valid
test:
npm test

setup-js:
cd js && npm install

# Add Git hooks

hooks:
cp pre-commit.sh .git/hooks/pre-commit


# Lint code

lint: lint-js

lint-js:
cd js && npm run lint

# Run tests

test: test-js

test-js:
cd js && npm test

# Run tests with coverage

cover: cover-js

cover-js:
cd js && npm run cover

# Run benchmarks

bench: bench-js

bench-js:
cd js && npm run bench


# Run any development servers

run:
cd js && npm start


# Build packages

build: build-js
.PHONY: build

build-js:
cd js && npm run build
# Build
build:
npm run build

# Generate documentation

docs: docs-js

docs-js:
cd js && npm run docs
docs:
npm run docs

# Clean up local development environment

clean: clean-js

clean-js:
cd js && npm run clean
clean:
npm run clean
Loading

0 comments on commit eb71029

Please sign in to comment.