Skip to content

Commit 446aa42

Browse files
committed
Enable testing of graphql-client-web in CI
1 parent 32f7667 commit 446aa42

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ node_modules/
33
**/*.rs.bk
44
Cargo.lock
55
.idea
6+
scripts/*
7+
!scripts/*.sh

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ before_script:
99
- sudo apt-get install -y nodejs
1010
- npm i -g prettier
1111
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then (rustup component add rustfmt-preview clippy-preview) fi
12+
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then (rustup target add wasm32-unknown-unknown) fi
13+
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then (cargo install -f wasm-bindgen-cli) fi
14+
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then (sudo apt-get install -y firefox) fi
15+
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then (./scripts/install_geckodriver.sh) fi
1216
script:
1317
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then (cargo fmt --all -- --check) fi
1418
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then (cargo clippy -- -D warnings) fi
1519
- prettier --debug-check -l './**/*.json' './**/*.graphql'
1620
- cargo test --all
1721
- cargo build --manifest-path=./graphql_client/examples/github/Cargo.toml
1822
- cargo build --manifest-path=./graphql_client_cli/Cargo.toml
23+
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then (cd graphql_client_web && cargo test --target wasm32-unknown-unknown) fi

scripts/install_geckodriver.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
# This script is meant for CI only.
4+
5+
set -ex
6+
7+
wget https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz
8+
tar xzf geckodriver-v0.23.0-linux64.tar.gz
9+
mv geckodriver /usr/local/bin/

0 commit comments

Comments
 (0)