Merge pull request #315 from ohanar/yarn2

use both npm and yarn in ci
This commit is contained in:
Nick Fitzgerald 2018-06-26 10:43:12 -07:00 committed by GitHub
commit 16bc3eb7e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4915 additions and 12 deletions

View File

@ -19,7 +19,7 @@ build: false
test_script:
- rustup target add wasm32-unknown-unknown
- npm install
- npm install # dirties repo, see .travis.yml
- cargo test
- cargo build --release -p wasm-bindgen-cli

1
.gitignore vendored
View File

@ -3,5 +3,6 @@
Cargo.lock
node_modules
package-lock.json
npm-shrinkwrap.json
yarn.lock
*.d.ts

View File

@ -10,13 +10,37 @@ matrix:
# Tests pass on nightly
- rust: nightly
before_install: rustup target add wasm32-unknown-unknown
before_install:
- rustup target add wasm32-unknown-unknown
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install v10.5
install:
# dirties git repository, there doesn't seem to be a way to resolve this other than
# to run `npm install` twice or by using `npm ci` (which is currently broken)
- npm install
script:
- cargo test
# Check JS output from all tests against eslint
- ./node_modules/.bin/eslint ./target/generated-tests/*/out*.js
env: RUST_BACKTRACE=1
# Tests pass on nightly using yarn
- rust: nightly
before_install:
- rustup target add wasm32-unknown-unknown
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install v10.5
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.7.0
- export PATH=$HOME/.yarn/bin:$PATH
install:
- yarn install --freeze-lockfile
script:
- cargo test
# Check JS output from all tests against eslint
- ./node_modules/.bin/eslint ./target/generated-tests/*/out*.js
env: RUST_BACKTRACE=1
# WebIDL tests pass on nightly
- rust: nightly
before_install: rustup component add rustfmt-preview --toolchain nightly
@ -46,7 +70,11 @@ matrix:
# All examples work
- rust: nightly
before_install: rustup target add wasm32-unknown-unknown
before_install:
- rustup target add wasm32-unknown-unknown
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install v10.5
script:
- |
(cd examples/hello_world && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh)
@ -87,13 +115,6 @@ matrix:
branch: master
install:
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install 10
- npm install
notifications:
email:
on_success: never

View File

@ -427,7 +427,6 @@ impl Project {
if !Path::new("node_modules").exists() {
panic!("\n\nfailed to find `node_modules`, have you run `npm install` yet?\n\n");
}
fs::hard_link("package-lock.json", root.join("package-lock.json")).unwrap();
let cwd = env::current_dir().unwrap();
symlink_dir(&cwd.join("node_modules"), &root.join("node_modules")).unwrap();
@ -539,4 +538,4 @@ mod structural;
mod u64;
mod webidl;
mod comments;
mod validate_prt;
mod validate_prt;

4882
yarn.lock Normal file

File diff suppressed because it is too large Load Diff