Skip to content

Commit 8a88649

Browse files
authored
docs: add section on PR checks to CONTRIBUTING.md (#685)
1 parent 8dc027f commit 8a88649

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"id": "8b182a5d-fd51-42a7-a716-6fcec176013c",
3+
"type": "documentation",
4+
"description": "Enhance **CONTRIBUTING.md** with additional details about required PR checks and how to run them locally",
5+
"issues": [
6+
"awslabs/aws-sdk-kotlin#683"
7+
]
8+
}

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,46 @@ of your request may disagree and ask that you add one anyway.
9191
}
9292
```
9393

94+
### Automated PR checks
95+
96+
A number of automated workflows run when a PR is submitted. Generally speaking, each of these must pass before the PR is
97+
allowed to be merged. If your PR fails one of the checks, please attempt to address the problem and push a new commit to
98+
the PR. If you need help understanding or resolving a PR check failure, please reach out via a PR comment or a GitHub
99+
discussion. Please file a new issue if you believe there's a pre-existing bug in a PR check.
100+
101+
#### Lint
102+
103+
This repo uses [**ktlint**](https://github.com/pinterest/ktlint) (via the
104+
[ktlint Gradle plugin](https://github.com/JLLeitschuh/ktlint-gradle)). To run a lint check locally, run
105+
`./gradlew ktlint`.
106+
107+
#### CI linux/macos/windows-compat
108+
109+
To verify cross-OS compatibility, we run protocol tests on Linux, MacOS, and Windows runners provided by GitHub. Running
110+
these checks independently requires access to hosts with those operating systems. On a host with the correct operating
111+
system, run `./gradlew build publishToMavenlocal testAllProtocols`.
112+
113+
#### AWS CodeBuild BuildBatch
114+
115+
To verify that every service client behaves as expected, we codegen, compile, and test all services. Compiling every
116+
service client takes a long time and is dispatched to a build fleet when run as a PR check on GitHub. To run this check
117+
locally, run `./gradlew :codegen:sdk:bootstrap build`.
118+
119+
It is recommended to build only a subset of the services when testing locally, typically one or two directly affected by
120+
the change under review. To codegen only select services, pass the `-Paws.services` argument with one or more services,
121+
comma-delimited and prefixed by `+`. For example:
122+
123+
```shell
124+
./gradlew :codegen:sdk:bootstrap -Paws.services=+s3,+dynamodb,+sqs
125+
./gradlew build
126+
```
127+
128+
See [the **:coddegen:sdk** build file](codegen/sdk/build.gradle.kts) for more details.
129+
130+
#### Changelog verification
131+
132+
This check enforces the changelog requirements [described above](#Changelog).
133+
94134
## Finding contributions to work on
95135
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/aws-samples/aws-sdk-kotlin/labels/help%20wanted) issues is a great place to start.
96136

0 commit comments

Comments
 (0)