Skip to content
Merged
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
18 changes: 11 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,24 @@ composer install
```

### Environment variables
Set up [application default credentials](https://cloud.google.com/docs/authentication/getting-started)
by setting the environment variable `GOOGLE_APPLICATION_CREDENTIALS` to the path to a service
account key JSON file.
Some tests require specific environment variables to run. PHPUnit will skip the tests
if these environment variables are not found. Run `phpunit -v` for a message detailing
which environment variables are missing. Then you can set those environent variables
to run against any sample project as follows:

Then set any environment variables needed by the test. Check the
`$SAMPLES_DIRECTORY/test` directory to see what specific variables are needed.
```
export GOOGLE_PROJECT_ID=YOUR_PROJECT_ID
export GOOGLE_STORAGE_BUCKET=YOUR_BUCKET
```

If you have access to the Google Cloud Kokoro project, decrypt the
`.kokoro/secrets.sh.enc` file and load those environment variables. Follow
the instructions in [.kokoro/secrets-example.sh](.kokoro/secrets-example.sh).

If your tests require new environment variables, you can set them up in
[.kokoro/secrets.sh.enc](.kokoro/secrets.sh.enc). For instructions on managing those variables,
view [.kokoro/secrets-example.sh](.kokoro/secrets-example.sh) for more information.
`.kokoro/secrets.sh.enc` so they pass on Kokoro. For instructions on managing those
variables, view [.kokoro/secrets-example.sh](.kokoro/secrets-example.sh) for more
information.

### Run the tests

Expand Down