Skip to content

Commit

Permalink
docs: update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelgomesxyz committed Apr 23, 2024
1 parent dc109d7 commit 6288de7
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ git clone https://github.com/shakacode/heroku-to-control-plane
alias cpl="~/projects/heroku-to-control-plane/bin/cpl"
```

## Linting/Testing
## Linting

Before committing or pushing code, be sure to:

- Run `bundle exec rake update_command_docs` to sync any doc changes made in the source code to the docs
- Run `bundle exec rubocop -a` to fix any linting errors
- Run `bundle exec rspec` to run the test suite

You can also install [overcommit](https://github.com/sds/overcommit) and let it automatically check for you:

Expand All @@ -28,6 +27,28 @@ gem install overcommit
overcommit --install
```

## Testing

We use real apps for the tests. You'll need to have full access to a Control Plane org, and then set it as the env var `CPLN_ORG` when running the tests (or in the `.env` file):

```sh
CPLN_ORG=your-org-for-tests bundle exec rspec
```

Tests are separated between fast and slow. Slow tests can take a long time and usually involve building / deploying images and waiting for workloads to be ready / not ready, so they should only be run once in a while.

To run fast tests:

```sh
CPLN_ORG=your-org-for-tests bundle exec rspec --tag fast
```

To run slow tests:

```sh
CPLN_ORG=your-org-for-tests bundle exec rspec --tag slow
```

## Debugging

1. Use the `--verbose` option to see more detailed logs.
Expand Down

0 comments on commit 6288de7

Please sign in to comment.