Skip to content

Commit

Permalink
Change lint action triggers
Browse files Browse the repository at this point in the history
Action now triggers on a push to any branch that modifies gempyor for
quick feedback and pull request with any modified python files.
  • Loading branch information
TimothyWillard committed Oct 25, 2024
1 parent 3331eb8 commit d310fed
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ on:
workflow_dispatch:
push:
paths:
- '**/*.py'
branches:
- main
- 'flepimop/gempyor_pkg/**/*.py'
pull_request:
paths:
- '**/*.py'
Expand All @@ -28,8 +26,15 @@ jobs:
*
!documentation/
sparse-checkout-cone-mode: false
- name: Determine Source
run: |
if [ ${{ github.event_name }} == "push" ]; then
echo "BLACK_SRC=flepimop/gempyor_pkg/" >> $GITHUB_ENV
else
echo "BLACK_SRC=." >> $GITHUB_ENV
fi
- name: Black Formatter Check
uses: psf/black@stable
with:
src: '.'
src: ${{ env.BLACK_SRC }}
options: "--line-length ${{ env.BLACK_LINE_LENGTH }} --extend-exclude '${{ env.BLACK_EXTEND_EXCLUDE }}' --check --verbose"

0 comments on commit d310fed

Please sign in to comment.