Skip to content

Commit

Permalink
Run ruff check on CI
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Verst <[email protected]>
  • Loading branch information
berndverst committed Jan 18, 2024
1 parent 8f51088 commit 6b361b4
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,35 @@ on:
merge_group:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel tox
- name: Run Autoformatter
run: |
tox -e ruff
statusResult=$(git status -u --porcelain)
if [ -z statusResult ]
then
exit 0
else
echo "Source files are not formatted correctly. Run 'tox -e ruff' to autoformat."
exit 1
fi
- name: Run Linter
run: |
tox -e flake8
build:
needs: lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -36,9 +64,6 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install setuptools wheel tox
- name: Run Linter
run: |
tox -e flake8
- name: Check Typing
run: |
tox -e type
Expand Down

0 comments on commit 6b361b4

Please sign in to comment.