Skip to content

[improve][ci] check python doc syntax #38

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

Merged
merged 4 commits into from
Nov 12, 2022
Merged
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
26 changes: 3 additions & 23 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,43 +28,23 @@ github:
- queuing
- event-streaming
features:
# Enable wiki for documentation
wiki: true
# Enable issues management
wiki: false
issues: true
# Enable projects for project management boards
projects: true
enabled_merge_buttons:
# enable squash button:
squash: true
# disable merge button:
merge: false
# disable rebase button:
rebase: false
protected_branches:
main:
required_status_checks:
# # strict means "Require branches to be up to date before merging".
strict: false
# # Contexts are the names of checks that must pass.
# # See ./github/workflows/README.md for more documentation on this list.
# Contexts are the names of checks that must pass.
# See ./github/workflows/README.md for more documentation on this list.
contexts:
- Check Completion

required_pull_request_reviews:
dismiss_stale_reviews: false
require_code_owner_reviews: true
required_approving_review_count: 1

# squash or rebase must be allowed in the repo for this setting to be set to true.
required_linear_history: true

required_signatures: false
Comment on lines -59 to -62
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omit default settings.


# The following branch protections only ensure that force pushes are not allowed
# branch-3.xxx: {}


notifications:
commits: [email protected]
issues: [email protected]
Expand Down
42 changes: 37 additions & 5 deletions .github/workflows/ci-pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ concurrency:
cancel-in-progress: true

jobs:
check-and-lint:
name: Lint and check code
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install deps
run: pip install -U pydoctor
- name: Check docs syntax
run: |
pydoctor --make-html \
--html-viewsource-base=https://github.com/apache/pulsar-client-python/tree/main \
--docformat=numpy --theme=readthedocs \
--intersphinx=https://docs.python.org/3/objects.inv \
--html-output=apidocs \
pulsar

unit-tests:
name: Run unit tests
Expand Down Expand Up @@ -237,12 +255,26 @@ jobs:
ls -l *.dll
python -c 'import pulsar; c = pulsar.Client("pulsar://localhost:6650"); c.close()'


# Job that will be required to complete and depends on all the other jobs
check-completion:
name: Check Completion
runs-on: ubuntu-latest
needs: [unit-tests, linux-wheel, mac-wheels, windows-wheels]

if: ${{ always() }}
needs: [
check-and-lint,
unit-tests,
linux-wheel,
mac-wheels,
windows-wheels
]
steps:
- run: true
- run: |
if [[ ! ( \
"${{ needs.check-and-lint.result }}" == "success" \
&& "${{ needs.unit-tests.result }}" == "success" \
&& "${{ needs.linux-wheel.result }}" == "success" \
&& "${{ needs.mac-wheels.result }}" == "success" \
&& "${{ needs.windows-wheels.result }}" == "success" \
) ]]; then
echo "Required jobs haven't been completed successfully."
exit 1
fi