Skip to content
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

ci: workflow python ruff linting #341

Merged
merged 4 commits into from
Jan 11, 2024
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
10 changes: 8 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

jobs:
black:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -18,6 +18,12 @@ jobs:
with:
files: "**/*.py"

- uses: psf/black@stable
- if: ${{ steps.changed-files.outputs.all_changed_files != '' }}
uses: psf/black@stable
with:
src: ${{ steps.changed-files.outputs.all_changed_files }}

- if: ${{ steps.changed-files.outputs.all_changed_files != '' }}
uses: chartboost/ruff-action@v1
with:
src: ${{ steps.changed-files.outputs.all_changed_files }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ Any contribution is welcome and we only ask contributors to:
* Provide *at least* integration tests for any contribution.
* The Pull Request *MUST* contain a changelog fragment. See [Ansible documentation](https://docs.ansible.com/ansible/latest/community/development_process.html#creating-a-changelog-fragment) about fragments.
* Create an issue for any significant contribution that would change a large portion of the code base.
* Use [ruff](https://github.com/astral-sh/ruff) to lint and [black](https://github.com/psf/black) to format your changes on python code.

## Contributors ✨

Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/341-lint-ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
trivial:
- added python ruff linting action
Loading