forked from runfinch/finch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary PR adds [markdownlint](https://github.com/DavidAnson/markdownlint) to CI and Makefile. It ensures a consistent markdown style, and it also provides some useful checks (e.g., [broken link fragments](https://github.com/DavidAnson/markdownlint/blob/v0.26.2/doc/Rules.md#md051)). ## License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Hsing-Yu (David) Chen <[email protected]>
- Loading branch information
1 parent
18f7659
commit 72e1e59
Showing
7 changed files
with
84 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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 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 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,2 @@ | ||
# Modern IDEs usually automatically wrap long lines in *.md files, so this may be unnecessary. | ||
line-length: false |
This file contains 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 |
---|---|---|
|
@@ -17,21 +17,19 @@ | |
- [Sign Your Commits](#sign-your-commits) | ||
- [DCO](#dco) | ||
- [Pull Request Checklist](#pull-request-checklist) | ||
- [Build](#build-1) | ||
- [Lint](#lint) | ||
- [Testing](#testing) | ||
- [Unit Testing - Parallel by Default](#unit-testing---parallel-by-default) | ||
- [E2E Testing](#e2e-testing-1) | ||
- [E2E Testing Guidelines](#e2e-testing-guidelines) | ||
- [Go File Naming](#go-file-naming) | ||
|
||
Welcome! We are glad that you want to contribute to our project! 💖 | ||
|
||
As you get started, you are in the best position to give us feedback on areas of | ||
our project that we need help with including: | ||
|
||
* Problems found during setting up a new developer environment | ||
* Gaps in our Quickstart Guide or documentation | ||
* Bugs in our automation scripts | ||
- Problems found during setting up a new developer environment | ||
- Gaps in our Quickstart Guide or documentation | ||
- Bugs in our automation scripts | ||
|
||
If anything doesn't make sense, or doesn't work when you run it, please open a | ||
bug report and let us know! | ||
|
@@ -58,13 +56,13 @@ Maintainers are established contributors who are responsible for the entire proj | |
|
||
We welcome many different types of contributions including: | ||
|
||
* New features | ||
* Builds, CI/CD | ||
* Bug fixes | ||
* Documentation | ||
* Issue Triage | ||
* Communications / Social Media / Blog Posts | ||
* Release management | ||
- New features | ||
- Builds, CI/CD | ||
- Bug fixes | ||
- Documentation | ||
- Issue Triage | ||
- Communications / Social Media / Blog Posts | ||
- Release management | ||
|
||
## Find an Issue | ||
|
||
|
@@ -118,15 +116,14 @@ For more details, see [`.golangci.yaml`](./.golangci.yaml) and the `lint` target | |
After cloning the repo, run `make` to build the binary. | ||
|
||
The binary in _output can be directly used. E.g. initializing the vm and display the version | ||
``` | ||
./_output/bin/finch vm init | ||
|
||
```sh | ||
./_output/bin/finch vm init | ||
./_output/bin/finch version | ||
``` | ||
|
||
You can run `make install` to make finch binary globally accessible. | ||
|
||
|
||
### Unit Testing | ||
|
||
To run unit test locally, please run `make test-unit`. Please make sure to run the unit tests before pushing the changes. | ||
|
@@ -135,23 +132,23 @@ Ideally each go file should have a test file ending with `_test.go`, and we shou | |
|
||
To check unit test coverage, run `make coverage` under root finch-cli root directory. | ||
|
||
|
||
### E2E Testing | ||
|
||
Run these steps at the first time of running e2e tests | ||
|
||
VM instance is not expected to exist before running e2e tests, please make sure to remove it before going into next step: | ||
|
||
```sh | ||
./_output/bin/finch vm stop | ||
./_output/bin/finch vm remove | ||
``` | ||
|
||
To run e2e test locally, please run `make test-e2e`. Please make sure to run the e2e tests or add new e2e tests before pushing the changes. | ||
|
||
|
||
## Sign Your Commits | ||
|
||
### DCO | ||
|
||
Licensing is important to open source projects. It provides some assurances that | ||
the software will continue to be available based under the terms that the | ||
author(s) desired. We require that contributors sign off on commits submitted to | ||
|
@@ -162,33 +159,37 @@ have the right to contribute the code you are submitting to the project. | |
You sign-off by adding the following to your commit messages. Your sign-off must | ||
match the git user and email associated with the commit. | ||
|
||
This is my commit message | ||
```text | ||
This is my commit message | ||
Signed-off-by: Your Name <[email protected]> | ||
Signed-off-by: Your Name <[email protected]> | ||
``` | ||
|
||
Git has a `-s` command line option to do this automatically: | ||
|
||
git commit -s -m 'This is my commit message' | ||
```sh | ||
git commit -s -m 'This is my commit message' | ||
``` | ||
|
||
If you forgot to do this and have not yet pushed your changes to the remote | ||
repository, you can amend your commit with the sign-off by running | ||
|
||
git commit --amend -s | ||
```sh | ||
git commit --amend -s --no-edit | ||
``` | ||
|
||
## Pull Request Checklist | ||
|
||
When you submit your pull request, or you push new commits to it, our automated | ||
systems will run some checks on your new code. We require that your pull request | ||
passes these checks, but we also have more criteria than just that before we can | ||
accept and merge it. We recommend that you check the following things locally | ||
before you submit your code: | ||
|
||
### Build | ||
When you submit your pull request, or you push new commits to it, our automated systems will run some checks on your new code. We require that your pull request passes these checks, and you can run the checks locally to iterate faster (you may need to [configure the environment](#development-environment-setup) first): | ||
|
||
```make``` | ||
```sh | ||
make test-unit | ||
make test-e2e | ||
make lint | ||
``` | ||
|
||
### Lint | ||
```make lint``` | ||
We also have more criteria than just that before we can accept and merge it. We recommend that you check the following things locally | ||
before you submit your code: | ||
|
||
### Testing | ||
|
||
|
@@ -207,7 +208,7 @@ Rationale: | |
|
||
Keeping a good unit test coverage will be part of pull request review. You can run `make coverage` to self-check the coverage. | ||
|
||
#### E2E Testing | ||
#### E2E Testing Guidelines | ||
|
||
```make test-e2e``` | ||
|
||
|
This file contains 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 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 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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# hello, finch! | ||
# hello, finch | ||
|
||
Say hello to Finch :wave: | ||
|
||
``` | ||
$ finch build . -t hello-finch | ||
$ finch run --rm hello-finch | ||
```sh | ||
finch build . -t hello-finch | ||
finch run --rm hello-finch | ||
``` |