Skip to content

Commit c3f4951

Browse files
authored
docs: add section on PR checks to CONTRIBUTING.md (#692)
1 parent e71ca72 commit c3f4951

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"id": "83024e02-aefa-4457-94a3-bd9c3eecf396",
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: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,51 @@ The last line of commits introducing breaking changes should be in the form `BRE
136136

137137
Breaking changes should also add an exclamation mark `!` after the type/scope (e.g. `refactor(rt)!: drop support for Android API < 20`)
138138

139+
### Automated PR checks
140+
141+
A number of automated workflows run when a PR is submitted. Generally speaking, each of these must pass before the PR is
142+
allowed to be merged. If your PR fails one of the checks, please attempt to address the problem and push a new commit to
143+
the PR. If you need help understanding or resolving a PR check failure, please reach out via a PR comment or a GitHub
144+
discussion. Please file a new issue if you believe there's a pre-existing bug in a PR check.
145+
146+
#### Lint
147+
148+
This repo uses [**ktlint**](https://github.com/pinterest/ktlint) (via the
149+
[ktlint Gradle plugin](https://github.com/JLLeitschuh/ktlint-gradle)). To run a lint check locally, run
150+
`./gradlew ktlint`.
151+
152+
#### CI linux/macos/windows-compat
153+
154+
To verify cross-OS compatibility, we build our code against Linux, MacOS, and Windows runners provided by GitHub.
155+
Running these checks independently requires access to hosts with those operating systems. On a host with the correct
156+
operating system, run `./gradlew build`.
157+
158+
#### CI downstream
159+
160+
This repo is a core dependency of [**aws-sdk-kotlin**](https://github.com/awslabs/aws-sdk-kotlin) and many changes made
161+
here could impact that repo as well. To ensure that **aws-sdk-kotlin** continues to function correctly, we run a
162+
downstream CI check that builds both code bases in a shared workspace. To run this check locally, check out both
163+
repositories into subdirectories of the same parent, build/publish **smithy-kotlin** followed by
164+
**aws-sdk-kotlin**, and then run the protocol tests. For example:
165+
166+
```shell
167+
mkdir path/to/workspace # create a new directory to hold both repositories
168+
cd path/to/workspace
169+
git clone -b branch-name https://github.com/awslabs/smithy-kotlin.git # replace branch-name as appropriate
170+
git clone -b branch-name https://github.com/awslabs/aws-sdk-kotlin.git # replace branch-name as appropriate
171+
cd smithy-kotlin
172+
./gradlew build publishToMavenLocal
173+
cd ../aws-sdk-kotlin
174+
./gradlew build publishToMavenLocal testAllProtocols
175+
```
176+
177+
**Note**: Replace `branch-name` in the above commands with the actual names of your branches. When making linked changes
178+
across both repos, it's best to create/use the same branch name in both locations.
179+
180+
#### Changelog verification
181+
182+
This check enforces the changelog requirements [described above](#Changelog).
183+
139184
## Finding contributions to work on
140185
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' issues is a great place to start.
141186

0 commit comments

Comments
 (0)