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

ci: simplify lint action #612

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Changes from all 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
18 changes: 12 additions & 6 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:
jobs:
build:
if: github.event.pull_request.draft == false
name: Linting build
name: Linting
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -46,11 +46,17 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-python-and-package
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
extras-require: test
- name: Check style against standards using ruff
- name: Python info
shell: bash -l {0}
run: |
which python3
python3 --version
- name: Check linting and formatting using ruff
run: |
ruff check
ruff format --check
python3 -m pip install ruff
ruff check || (echo "Please ensure you have the latest version of ruff (`ruff -V`) installed locally." && (exit 1))
ruff format --check || (echo "Please ensure you have the latest version of ruff (`ruff -V`) installed locally." && (exit 1))
Loading