Skip to content

Commit

Permalink
Contribution guide
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Sep 9, 2021
1 parent 4eb8586 commit 6b360f9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Contribution guide

## Running tests

To run the test suite, you need a Google Cloud Storage bucket and a Service Account with a key. You must also set the following environment variables:

* `TEST_GCLOUD_BUCKET` — the name of the bucket.
* `TEST_GCLOUD_CREDENTIALS_PATH` — path to the Service Account's keyfile.

It's best to put these in a `.env` file so that you don't have to supply these variables over and over. The test suite automatically loads environment variables from `.env`.

Then run the test suite with:

~~~bash
bundle exec rspec
~~~
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,7 @@ DistributedLock::GoogleCloudStorage::Lock(
logger: logger,
)
~~~

## Contributing

Please read the [Contribution guide](CONTRIBUTING.md).
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'dotenv'
require 'google/cloud/errors'
require 'rspec/retry'
Expand Down

0 comments on commit 6b360f9

Please sign in to comment.