Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add yarn.lock files, use Yarn during CI build #290

Merged
merged 1 commit into from
Jan 9, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ logs/
*.iml
.idea/
.nyc_output
yarn.lock
100 changes: 100 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,106 @@ accept your pull requests.
1. Ensure that your code has an appropriate set of unit tests which all pass.
1. Submit a pull request!

### How to run the tests

1. You must install dependencies at the root of the `nodejs-docs-samples`
directory. You can do so with `yarn` or `npm`:

npm install

or

yarn install

**Note:** Use `npm` *or* `yarn` exclusively, don't mix them.

1. In a terminal, start Redis:

redis-server

1. In another terminal, start `memcached`:

memcached

1. In another terminal, run the unit tests from the root of the project:

npm test

or

yarn test

With code coverage:

npm run cover

or

yarn run cover

1. Then run the system tests from the root of the project:

npm run system-test

or

yarn run system-test

With code coverage:

npm run system-cover

or

yarn run system-cover

1. Or run all the tests at once:

npm run all-test

or

yarn run all-test

With code coverage:

npm run all-cover

or

yarn run all-cover

### Run the tests for a single sample

1. You must install dependencies at the root of the `nodejs-docs-samples`
directory. You can do so with `yarn` or `npm`:

npm install

or

yarn install

1. Change directory to one of the sample folders, e.g. `bigquery`:

cd bigquery/

1. Run the tests (check the `package.json` file):

npm test

or

yarn test

or

npm run system-test

or

yarn run system-test

## Style

Samples in this repository follow the [JavaScript Semi-Standard
Expand Down
40 changes: 8 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ on Google Cloud Platform.
* [Setup](#setup)
* [Prerequisites](#prerequisites)
* [How to run a sample](#how-to-run-a-sample)
* [How to run the tests](#how-to-run-the-tests)
* [Client libraries](#client-libraries)
* [Google Cloud Node.js client library](#google-cloud-nodejs-client-library)
* [Google API Node.js client library](#google-api-nodejs-client-library)
Expand Down Expand Up @@ -144,40 +143,15 @@ on Google Cloud Platform.

npm install

1. Run the sample:

node sample_file.js [args]...

### How to run the tests

1. Read the [Contributing Guide][contrib].
1. In a terminal, start Redis:

redis-server

1. In another terminal, start `memcached`:

memcached
or

1. In another terminal, run the unit tests from the root of the project:
yarn install

npm test
**Note:** Use `npm` *or* `yarn` exclusively, don't mix them.

or with coverage:

npm run coverage

1. Then run the system tests from the root of the project:

npm run system-test

or with coverage:

npm run system-cover

1. Or run all the tests at once with coverage:
1. Run the sample:

npm run all-cover
node sample_file.js [args]...

## Client libraries

Expand All @@ -190,7 +164,9 @@ The recommended, idiomatic client for Google Cloud Platform services.

### <img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=36" alt="Google logo" title="Google" align="left" height="36" width="36" style="margin-top: 9px;"/>Google API Node.js client library

An older Node.js client library for making REST requests to Google APIs.
An older Node.js client library for making REST requests to Google APIs. Use
this for Google Cloud APIs that are not yet supported by the Google Cloud
Node.js client library.

* [Documentation](http://google.github.io/google-api-nodejs-client/)
* [Source code](https://github.com/google/google-api-nodejs-client)
Expand Down
2 changes: 1 addition & 1 deletion appengine/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"start": "node app.js",
"test": "cd ..; npm run t -- appengine/analytics/test/*.test.js"
"test": "cd ../..; npm run t -- appengine/analytics/test/*.test.js"
},
"dependencies": {
"express": "4.14.0",
Expand Down
Loading