Skip to content

Commit

Permalink
Merge pull request #552 from PyFstat/flake8-action
Browse files Browse the repository at this point in the history
add standalone flake8 action
  • Loading branch information
dbkeitel authored Jun 28, 2024
2 parents 2280ee3 + a0f1883 commit 8fafe65
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Flake8 linting

on: [push, pull_request]

jobs:
lint:
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: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package and development dependencies
run: |
python -m pip install --upgrade pip
pip install -e ${GITHUB_WORKSPACE}[style]
- name: Linting with flake8
run: |
flake8 --count --statistics .
5 changes: 1 addition & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ jobs:
- name: Install package and development dependencies
run: |
python -m pip install --upgrade pip
pip install -e ${GITHUB_WORKSPACE}[style,test,wheel]
- name: Linting with flake8
run: |
flake8 --count --statistics .
pip install -e ${GITHUB_WORKSPACE}[test,wheel]
- 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 8fafe65

Please sign in to comment.