From ce3f282967ded48d21bf6588834893c066e4be8b Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Tue, 25 Jul 2023 12:53:15 +1000 Subject: [PATCH] github/workflows: Split ruff into its own action. This matches the main repo, and conceputually ruff is not strictly doing "code formatting". Signed-off-by: Jim Mussared --- .github/workflows/code_formatting.yml | 2 -- .github/workflows/ruff.yml | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/code_formatting.yml b/.github/workflows/code_formatting.yml index 7e74776af..71c50aa1b 100644 --- a/.github/workflows/code_formatting.yml +++ b/.github/workflows/code_formatting.yml @@ -7,8 +7,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: pip install --user ruff - - run: ruff --format=github . - uses: actions/setup-python@v4 - name: Install packages run: source tools/ci.sh && ci_code_formatting_setup diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 000000000..b8e43dc78 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,10 @@ +# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python +name: Python code lint with ruff +on: [push, pull_request] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: pip install --user ruff + - run: ruff --format=github .