mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-02 18:31:05 +00:00
Merge pull request #1616 from najamelan/fix/travis
Simplify instructions for CI testing of wasm code
This commit is contained in:
commit
1beb19b698
@ -10,37 +10,23 @@ request!](https://github.com/rustwasm/wasm-bindgen)
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
language: rust
|
language: rust
|
||||||
rust: nightly
|
rust : nightly
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
firefox: latest
|
firefox: latest
|
||||||
chrome: stable
|
chrome : stable
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- rustup target add wasm32-unknown-unknown
|
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
# Downloads a `wasm-bindgen` release binary from https://github.com/rustwasm/wasm-bindgen/releases.
|
|
||||||
# Alternatively, use `wasm-pack` to manage `wasm-bindgen` binaries for you
|
|
||||||
- curl -OL https://github.com/rustwasm/wasm-bindgen/releases/download/0.2.21/wasm-bindgen-0.2.21-x86_64-unknown-linux-musl.tar.gz
|
|
||||||
- tar xf wasm-bindgen-0.2.21-x86_64-unknown-linux-musl.tar.gz
|
|
||||||
- chmod +x wasm-bindgen-0.2.21-x86_64-unknown-linux-musl/wasm-bindgen
|
|
||||||
# Moves the binaries to a directory that is in your PATH
|
|
||||||
- mv wasm-bindgen-0.2.21-x86_64-unknown-linux-musl/wasm-bindgen* ~/.cargo/bin
|
|
||||||
# Install node.js with nvm.
|
|
||||||
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
|
|
||||||
- source ~/.nvm/nvm.sh
|
|
||||||
- nvm install v10.5
|
|
||||||
# Install chromedriver.
|
|
||||||
- curl --retry 5 -LO https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip
|
|
||||||
- unzip chromedriver_linux64.zip
|
|
||||||
# Install geckodriver.
|
|
||||||
- curl --retry 5 -LO https://github.com/mozilla/geckodriver/releases/download/v0.21.0/geckodriver-v0.21.0-linux64.tar.gz
|
|
||||||
- tar xf geckodriver-v0.21.0-linux64.tar.gz
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Test in Chrome.
|
|
||||||
- CHROMEDRIVER=$(pwd)/chromedriver cargo test --target wasm32-unknown-unknown
|
# this will test the non wasm targets if your crate has those, otherwise remove this line.
|
||||||
# Test in Firefox.
|
#
|
||||||
- GECKODRIVER=$(pwd)/geckodriver cargo test --target wasm32-unknown-unknown
|
- cargo test
|
||||||
|
|
||||||
|
- wasm-pack test --firefox --headless
|
||||||
|
- wasm-pack test --chrome --headless
|
||||||
```
|
```
|
||||||
|
|
||||||
## AppVeyor
|
## AppVeyor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user