From 253c51c5e22dca3e5c7989d8f79b6488b9740f63 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 18 Jun 2024 17:02:07 +0200 Subject: [PATCH] ci: simplify lint action this action doesn't require the entire package to be built, merely ruff to be installed. --- .github/workflows/linting.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 4f72ac07..1a785b7e 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -30,7 +30,7 @@ on: jobs: build: if: github.event.pull_request.draft == false - name: Linting build + name: Linting runs-on: ${{ matrix.os }} strategy: @@ -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."