diff options
author | Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> | 2024-08-27 00:07:09 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-27 00:07:09 +0530 |
commit | d70c2162e1a98aeee60de32ae8a1e24c187043a9 (patch) | |
tree | 8f9dd9ffa27529ee09219300a0b49bcefb24f06b | |
parent | d5a4c525adce8e0d4c85a9f2db412a3c82b49df3 (diff) | |
parent | aa23e5707382d6a5f352b215a16c53cfa645481b (diff) | |
download | vyos-workflow-test-temp-d70c2162e1a98aeee60de32ae8a1e24c187043a9.tar.gz vyos-workflow-test-temp-d70c2162e1a98aeee60de32ae8a1e24c187043a9.zip |
Merge pull request #31 from vyos/feature/test-darker
T0000: Update helper.py
-rw-r--r-- | .github/workflows/darker-lint.yml | 34 | ||||
-rw-r--r-- | src/tests/helper.py | 1 |
2 files changed, 27 insertions, 8 deletions
diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 08c4eac..c4ca348 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -1,22 +1,40 @@ --- -name: Darker Lint +name: Darker-Ruff Lint on: - pull_request: + pull_request_target: branches: - current +permissions: + pull-requests: write + contents: read + +env: + base_ref: ${{ github.event.pull_request.base.ref }} + jobs: darker-lint: runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: read steps: - uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.event.pull_request.head.ref }} + - uses: actions/setup-python@v5 - - uses: akaihola/darker@v2.1.1 - with: - options: "--check --diff --isort --color" - src: "." - version: "~=2.1.1" - lint: "flake8,pylint==2.13.1" + + - name: darker install + run: | + pip install git+https://github.com/akaihola/darker.git@master isort==5.11.4 ruff>=0.0.292 + + - name: Fetch base branch + run: | + git fetch origin ${base_ref}:${base_ref} + + - name: Analyze Code + run: | + darker -r ${base_ref}... --check --diff --lint "ruff check" --isort --color ./src
\ No newline at end of file diff --git a/src/tests/helper.py b/src/tests/helper.py index f417979..ea1ec74 100644 --- a/src/tests/helper.py +++ b/src/tests/helper.py @@ -28,3 +28,4 @@ def prepare_module(file_path='', module_name=''): print('True') print() if False: print('False') + if True: print('True Again') |