From e5ea4819df31567ed6cc89fcff62c574e3a43c62 Mon Sep 17 00:00:00 2001 From: KPrasch Date: Wed, 7 Feb 2024 14:19:19 +0100 Subject: [PATCH] code quality actions --- .github/workflows/darker.yml | 21 +++++++++++++++++++++ .github/workflows/python-publish.yml | 2 +- .github/workflows/ruff.yaml | 28 ++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/darker.yml create mode 100644 .github/workflows/ruff.yaml diff --git a/.github/workflows/darker.yml b/.github/workflows/darker.yml new file mode 100644 index 0000000..86e4201 --- /dev/null +++ b/.github/workflows/darker.yml @@ -0,0 +1,21 @@ +name: 🧹 Darker + +on: + pull_request: + branches: + - main + +jobs: + darker-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-python@v4 + with: + python-version: '3.12' + - uses: akaihola/darker@1.7.2 + with: + version: "1.7.2" diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index c26dbb9..427bfc1 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,4 +1,4 @@ -name: Upload Python Package +name: 📦 Upload Python Package on: release: diff --git a/.github/workflows/ruff.yaml b/.github/workflows/ruff.yaml new file mode 100644 index 0000000..dc296d1 --- /dev/null +++ b/.github/workflows/ruff.yaml @@ -0,0 +1,28 @@ +name: 🧹 Lint with Ruff + +on: + pull_request: + branches: + - main + +jobs: + ruff-lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install ruff + pip install . + + - name: Lint with Ruff + run: ruff --output-format=github nucypher