Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Note: Before submitting a pull request, please open an issue for discussion if y
## Checklist
- [ ] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md)
- [ ] README is updated to include [all relevant information](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#readme-file)
- [ ] **Tests** pass: `nox -s py-3.9` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#test-environment-setup))
- [ ] **Tests** pass: `nox -s py-3.10` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#test-environment-setup))
Comment thread
XrossFox marked this conversation as resolved.
- [ ] **Lint** pass: `nox -s lint` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#test-environment-setup))
- [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones)
- [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones)
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/check-pr-manual-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "CI: Check Manual Test Completion"
on:
pull_request:
types: [opened, edited, synchronize]
jobs:
check-task:
runs-on: ubuntu-latest
steps:
- name: Verify tests checkbox is ticked
uses: actions/github-script@v7
with:
script: |
const prBody = context.payload.pull_request.body;

if (!prBody) {
core.setFailed("PR description is empty. Please use the PR template and check the required boxes.");
return;
}

// Regex checks for a markdown checkbox followed by 'nox -s py-3.'
// [ x ] or [x] means checked. [ ] means unchecked.
const checkedRegex = /- \[[xX]\] .*nox -s py-3\.\d+/;
const includesTargetText = prBody.includes("nox -s py-3.");

if (!includesTargetText) {
core.setFailed("The required test verification line seems to be missing from the PR description.");
return;
}

if (checkedRegex.test(prBody)) {
console.log("Success: The test execution checkbox has been marked!");
} else {
core.setFailed("You must run the tests and check the 'nox -s py-3.9' box before this PR can be merged.");
}
2 changes: 1 addition & 1 deletion AUTHORING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ started with using a service or API — it should be in a _quickstart_ folder.

### Python Versions

Samples should support Python 3.9, 3.10, 3.11, 3.12 and 3.13.
Samples should support Python 3.10, 3.11, 3.12, 3.13 and 3.14.

If the API or service your sample works with has specific Python version
requirements different from those mentioned above, the sample should support
Expand Down
Loading