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

Workflow fail if black and isort fail #38

Merged
merged 5 commits into from
Apr 20, 2024
Merged
Changes from 4 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
12 changes: 11 additions & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install dependencies
run: |
Expand All @@ -33,9 +33,19 @@ jobs:
- name: Run Black
run: black ./ --config pyproject.toml
Copy link
Collaborator

@mrl280 mrl280 Apr 19, 2024

Choose a reason for hiding this comment

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

I don't think the "Run Black" section is wanted. The concern is if we format the code before checking it, then the workflow will always pass.


- name: Check Black formatting
uses: psf/black@stable
with:
options: "--check --verbose"
src: "./"
# use_pyproject: true, should be used but causing issues so commenting for now
Copy link
Collaborator

@mrl280 mrl280 Apr 19, 2024

Choose a reason for hiding this comment

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

More info in my comment below, but I don't think we actually want to use the use_pyproject option.


- name: Run Isort
run: isort .
Copy link
Collaborator

@mrl280 mrl280 Apr 19, 2024

Choose a reason for hiding this comment

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

Same comment as above, I don't think we want to keep the "Run Isort" section any more.


- name: Check Isort formatting
uses: isort/isort-action@master

- name: Setup flake8 annotations
uses: rbialon/[email protected]

Expand Down
Loading