Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Add .travis.yml #26

Merged
merged 1 commit into from
Feb 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 28 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
dist: trusty
sudo: false

language: go

env:
matrix:
- TEST_FOR_SERVER=true
- TEST_FOR_CLIENT=true

before_script:
# Setup Nodejs to run client-side toolchain.
# Parhaps we should create and run Docker container which includes binary to test this repository.
- nvm install 6
- curl -o- -L https://yarnpkg.com/install.sh | bash # install yarn pkg
- export PATH=$HOME/.yarn/bin:$PATH # add `yarn` to path.

script:
- ./script/travis_test.sh

matrix:
allow_failures:
# ESLint fails currently
- env: TEST_FOR_CLIENT=true

notifications:
email: false

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# editbook

[![TravisCI Build Status](https://travis-ci.org/karino2/editbook.svg?branch=master)](https://travis-ci.org/karino2/editbook)

EditBook is micro http server and web based editor.


Expand All @@ -21,4 +24,4 @@ $ ./main --client /README.md
# (partially) supported editor

- plain
- ace https://ace.c9.io/#nav=about
- ace https://ace.c9.io/#nav=about
13 changes: 13 additions & 0 deletions script/travis_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -ev

if [ "${TEST_FOR_SERVER}" = "true" ]; then
go build
elif [ "${TEST_FOR_CLIENT}" = "true" ]; then
cd editors/monaco/
yarn install
yarn run lint
else
echo 'This code path is run unexpectedly' 1>&2
exit 1
fi