Skip to content

Commit

Permalink
Add test to Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomontalbano committed Feb 20, 2019
1 parent 93ab70c commit c301192
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
27 changes: 22 additions & 5 deletions .travis.yml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,11 +3,28 @@ language: node_js
node_js: node_js:
- "8" - "8"


before_script: cache:
directories:
- $HOME/.cargo
- $TRAVIS_BUILD_DIR/target

before_install:
- curl https://sh.rustup.rs -sSf | sh -s -- -y - curl https://sh.rustup.rs -sSf | sh -s -- -y
- source $HOME/.cargo/env - source $HOME/.cargo/env
- cargo install wasm-pack


script: stages:
- npm run build - test
- npm run publish - name: deploy
if: branch = travis

jobs:
include:
- stage: test
script:
- npm test
- stage: deploy
before_script:
- cargo install wasm-pack
script:
- npm run build
- npm run publish
2 changes: 2 additions & 0 deletions README.md
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,7 @@
# WebAssembly vs Javascript # WebAssembly vs Javascript


[![Build Status](https://travis-ci.org/marcomontalbano/wa-vs-js-benchmark.svg?branch=master)](https://travis-ci.org/marcomontalbano/wa-vs-js-benchmark)

*A comparison between WebAssembly and Javascript made for ~~studying~~ fun.* *A comparison between WebAssembly and Javascript made for ~~studying~~ fun.*


## What's in the box ## What's in the box
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"start": "webpack-dev-server --mode=development", "start": "webpack-dev-server --mode=development",
"start:dist": "npx serve dist", "start:dist": "npx serve dist",
"test:rs": "cargo build --verbose && cargo test --verbose", "test:rs": "cargo build --verbose && cargo test --verbose",
"test": "npm run test", "test": "npm run test:rs",
"build:wasm": "wasm-pack build", "build:wasm": "wasm-pack build",
"build:rs": "cargo build --release", "build:rs": "cargo build --release",
"build:js": "webpack --mode=production --config webpack.config.js", "build:js": "webpack --mode=production --config webpack.config.js",
Expand Down

0 comments on commit c301192

Please sign in to comment.