Skip to content

Commit

Permalink
Merge pull request #551 from PyFstat/black-action
Browse files Browse the repository at this point in the history
add standalone black action
  • Loading branch information
dbkeitel authored Jun 28, 2024
2 parents bcc06f1 + 699ac5d commit 488e266
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Black style check

on: [push, pull_request]

jobs:
black:
runs-on: ubuntu-latest
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --diff"
version: "~= 24.0"
3 changes: 0 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ jobs:
- name: Linting with flake8
run: |
flake8 --count --statistics .
- name: Style check with black
run: |
black --check --diff .
- name: Run test suite with pytest
run: |
(cd .. && pytest --durations=0 $GITHUB_WORKSPACE/tests/ --log-file=$GITHUB_WORKSPACE/tests.log)
Expand Down

0 comments on commit 488e266

Please sign in to comment.