Skip to content

Commit

Permalink
ci: simplify lint action
Browse files Browse the repository at this point in the history
this action doesn't require the entire package to be built, merely ruff to be installed.
  • Loading branch information
DaniBodor committed Jun 18, 2024
1 parent 6e51512 commit 253c51c
Showing 1 changed file with 12 additions and 6 deletions.
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."
ruff format --check || echo "Please ensure you have the latest version of ruff (`ruff -V`) installed locally."

0 comments on commit 253c51c

Please sign in to comment.