summaryrefslogtreecommitdiff
path: root/.github/workflows/darker-lint.yml
diff options
context:
space:
mode:
authorVijayakumar A <36878324+kumvijaya@users.noreply.github.com>2024-09-04 00:50:48 +0530
committerGitHub <noreply@github.com>2024-09-04 00:50:48 +0530
commit91ff46bb98e07a0acb3ba92ac9381a5ccd39076d (patch)
tree8a53c7a9c90b68b0c9c8da85d04402c1ef9bede0 /.github/workflows/darker-lint.yml
parentca90f9690289bf1b2187e85ec7a64e2446de7f06 (diff)
downloadvyos-workflow-test-temp-91ff46bb98e07a0acb3ba92ac9381a5ccd39076d.tar.gz
vyos-workflow-test-temp-91ff46bb98e07a0acb3ba92ac9381a5ccd39076d.zip
T0000: check
Diffstat (limited to '.github/workflows/darker-lint.yml')
-rw-r--r--.github/workflows/darker-lint.yml19
1 files changed, 14 insertions, 5 deletions
diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml
index f13d683..ec7d12a 100644
--- a/.github/workflows/darker-lint.yml
+++ b/.github/workflows/darker-lint.yml
@@ -11,7 +11,7 @@ permissions:
contents: read
jobs:
- darker-lint:
+ darker-ruff-lint:
runs-on: ubuntu-latest
permissions:
pull-requests: write
@@ -22,7 +22,7 @@ jobs:
with:
repository: vyos/.github
path: reusable-actions
- ref: feature/ruff-toml
+ ref: current
- name: Checkout head
uses: actions/checkout@v4
@@ -31,16 +31,25 @@ jobs:
fetch-tags: true
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
+ path: repo
- name: Fetch base
run: |
+ cd repo
git fetch https://github.com/${{ github.event.pull_request.base.repo.full_name }} ${{ github.event.pull_request.base.ref }}:refs/remotes/origin/base
- - name: darker install
+ - name: Setup python
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.11'
+
+ - name: Install darker ruff
run: |
pip install git+https://github.com/akaihola/darker.git@master ruff>=0.0.292
- name: Analyze Code
run: |
- ls -ltr
- darker -r origin/base --check --diff --lint "ruff check --config ./reusable-actions/.github/ruff.toml" --color . \ No newline at end of file
+ cd repo
+ cp origin/base/ruff.toml .
+ cat ruff.toml
+ darker -r origin/base --check --diff --lint "ruff check" --color . \ No newline at end of file