Skip to content

Commit

Permalink
chore: add setup and test notes in contributing.md (aws-amplify#6146)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesonwilliams authored Dec 11, 2020
1 parent a0aef0e commit 41ef165
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,25 @@ However, to construct a more comprehensive commit message with proper message ti
? Are there any breaking changes? Y/N
? Does this change affect any open issues? Y/N
? Add issue references (e.g. "fix #123", "re #123".): <issue number if exists>
```

## Getting Started with Development

Start from a clean project state:
```bash
git clean -fdx -e .vscode
git fetch origin && checkout --track origin/master -B master
```

To get started, ensure you have [`npm`](https://nodejs.org/en/download/) installed. Use it to install `yarn` and `lerna`:
```bash
npm install --global yarn lerna
```

From there, you can run the `setup-dev` target:
```bash
yarn clean
yarn setup-dev
```

For the question `What is the scope of this change`, enter the name of the package that received the major codebase changes. Note that the package name under the `packages/amplify-cli` folder is actually `cli`.
Expand All @@ -71,6 +89,12 @@ The "pre-push" hook runs lint, and unit tests on the changed packages.

Please ensure that your change still passes unit tests, and ideally integration/UI tests. It's OK if you're still working on tests at the time that you submit, but be prepared to be asked about them. Wherever possible, pull requests should contain tests as appropriate. Bugfixes should contain tests that exercise the corrected behavior (i.e., the test should fail without the bugfix and pass with it), and new features should be accompanied by tests exercising the feature.

To run the tests:
```bash
yarn test
```
Note: Before running the tests, you must first complete the one-time setup instructions under [Getting Started with Development](#getting-started-with-development).

## Code Style

Generally, match the style of the surrounding code. Please ensure your changes don't wildly deviate from those rules. You can run `yarn lint-fix` to identify and automatically fix most style issues.
Expand Down

0 comments on commit 41ef165

Please sign in to comment.