-
Notifications
You must be signed in to change notification settings - Fork 74
Fix CI and improve contribute instructions #123
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d90f2a1
Fix db cleaner core version to match the other repo
arielj 8da65a9
Fix "uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Log…
arielj 559ad4c
Add CONTRIBUTE.md and docker-compose file with databases setup
arielj 62bb6f4
Update changelog
arielj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Guidelines for contributing | ||
|
|
||
| ## 1. Fork & Clone | ||
|
|
||
| Since you probably don't have rights to the main repo, you should Fork it (big | ||
| button up top). After that, clone your fork locally and optionally add an | ||
| upstream: | ||
|
|
||
| git remote add upstream git@github.com:DatabaseCleaner/database_cleaner-active_record.git | ||
|
|
||
| ## 2. Make sure the tests run fine | ||
|
|
||
| The gem uses Appraisal to configure different Gemfiles to test different Rails versions. | ||
|
|
||
| - You can run all the databases through docker if needed with `docker compose up` (you can also have them running on your system, just comment out the ones you don't need from the `docker-compose.yml` file) | ||
| - Copy `spec/support/sample.config.yml` to `spec/support/config.yml` and edit it | ||
| - `BUNDLE_GEMFILE=gemfiles/rails_6.1.gemfile bundle install` (change `6.1` with any version from the `gemfiles` directory) | ||
| - `BUNDLE_GEMFILE=gemfiles/rails_6.1.gemfile bundle exec rake` | ||
|
|
||
| Note that if you don't have all the supported databases installed and running, | ||
| some tests will fail. | ||
|
|
||
| > Note that you can check the `.github/workflows/ci.yml` file for different combinations of Ruby and Rails that are expected to work | ||
|
|
||
| ## 3. Prepare your contribution | ||
|
|
||
| This is all up to you but a few points should be kept in mind: | ||
|
|
||
| - Please write tests for your contribution | ||
| - Make sure that previous tests still pass | ||
| - Push it to a branch of your fork | ||
| - Submit a pull request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| services: | ||
| postgres: | ||
| image: postgres:16 # specify the version needed for a given app | ||
| environment: | ||
| - POSTGRES_PASSWORD=postgres # this is required | ||
| ports: | ||
| - "127.0.0.1:5432:5432" # so we can use `localhost` as the host | ||
| mysql: | ||
| image: mysql:9.3 | ||
| environment: | ||
| - MYSQL_ROOT_PASSWORD=mysql | ||
| ports: | ||
| - "127.0.0.1:3306:3306" | ||
| redis: | ||
| image: redis:6.2-alpine | ||
| restart: always | ||
| ports: | ||
| - "127.0.0.1:6379:6379" | ||
| command: redis-server --save 20 1 --loglevel warning |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no such version on rubygems: https://rubygems.org/gems/database_cleaner-core