Skip to content
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

Add Makefile documentation to README #99

Merged
merged 1 commit into from
Dec 7, 2021
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
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,41 @@ Track the following tables:
- `sentpayment_events`
- `transactions`

### Using the Makefile

Explorer uses `make` to automate development tasks.
In general, every development task related to the application lifecycle can be controlled via `make`.
The following commands are provided:

#### General
- `start`: Launch the application and all runtime dependencies for ordinary local development
- `stop`: Shut down the application and all runtime dependencies
- `test`: Run all tests.
Equivalent to running `integration_test`, `contract_test`, and `acceptance_test`
- `lint`: Lint all application code.
Returns a nonzero exit code if any issues are found
- `ship`: Lints and tests all code, then, if successful, execute `git push`
- `build`: Compile the application for deployment
- `fmt`: Autoformat all application code with Prettier
- `list`: Display all available Make targets
- `lintfix`: Lint all application code and automatically fix issues that can be fixed.
Returns a nonzero exit code if any unfixable issues are found

#### Less Commonly Used
- `integration_test`: Run Jest unit tests for the application
- `contract_test`: Validate the GraphQL client is being used without type errors
- `acceptance_test`: Run Codecept UI tests headlessly.
In this configuration, the application uses Wiremock for all runtime dependencies
- `acceptance_test_ui`: Run Codecept UI tests with the Codecept runner
- `start_for_e2e`: Start the application and the dependencies that are used for acceptance tests (i.e. Wiremock)
- `hasura_start`: Start the Hasura server, for local development
- `hasura_stop`: Stop the Hasura server
- `wiremock_start`: Start the Wiremock server, for acceptance tests
- `wiremock_stop`: Stop the Wiremock server
- `generate_diem_client`: Regenerate the auto-generated Diem blockchain client from the OpenAPI documentation.
Edit the Makefile directly if you need to change the URL of the `openapi.yaml` file used.
- `generate_gql_client`: Regenerate the auto-generated Zeus GraphQL client from the configuration of the Hasura server

## Helm Chart

[Helm](https://helm.sh) must be installed to use the charts.
Expand Down