From 01a22425cbfb11d9982bea813a511f4e26cef391 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:09:01 +0530 Subject: T0000: test --- src/tests/helper.py | 3 --- src/tests/test_config_diff.py | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tests/helper.py b/src/tests/helper.py index c00a410..636e1ec 100644 --- a/src/tests/helper.py +++ b/src/tests/helper.py @@ -27,7 +27,4 @@ def prepare_module(file_path='', module_name=''): if True: print('True') print() - if False: print('False') - if True: print('True Again') - if True: print('True Once Again') print('hello') diff --git a/src/tests/test_config_diff.py b/src/tests/test_config_diff.py index 9558fa5..a42ccac 100644 --- a/src/tests/test_config_diff.py +++ b/src/tests/test_config_diff.py @@ -66,6 +66,8 @@ class TestConfigDiff(TestCase): l_union = vyos.configtree.union(sub, inter) if False: print('False') + if True: print('True Again') + if True: print('True Once Again') self.assertEqual(r_union.to_string(), self.config_right.to_string(ordered_values=True)) -- cgit v1.2.3 From 81e918c0061e2e55886efed0e4069207b54041ef Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:16:45 +0530 Subject: T0000: update --- .github/workflows/darker-lint.yml | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 974ffa0..c42c822 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -9,9 +9,6 @@ on: permissions: pull-requests: write contents: read - -env: - base_ref: ${{ github.event.pull_request.base.ref }} jobs: darker-lint: @@ -20,36 +17,22 @@ jobs: pull-requests: write contents: read steps: - - uses: actions/checkout@v4 + - name: Checkout head + uses: actions/checkout@v4 with: fetch-depth: 0 fetch-tags: true ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - uses: actions/setup-python@v5 + - name: Fetch base + run: | + 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 run: | pip install git+https://github.com/akaihola/darker.git@master ruff>=0.0.292 - # - name: Fetch base branch - # run: | - # git fetch origin ${base_ref}:refs/remotes/origin/base-current - - # - name: Fetch base branch - # run: | - # git fetch origin ${base_ref}:${base_ref} - - - - name: Fetch base and head commits - run: | - git fetch https://github.com/${{ github.event.pull_request.base.repo.full_name }} ${{ github.event.pull_request.base.ref }}:refs/remotes/origin/base - # git fetch origin ${{ github.event.pull_request.base.sha }}:refs/remotes/origin/temp-base - # git fetch origin ${{ github.event.pull_request.head.sha }}:refs/remotes/origin/temp-head - # git branch temp-base refs/remotes/origin/temp-base - # git branch temp-head refs/remotes/origin/temp-head - - name: Analyze Code run: | darker -r origin/base --check --diff --lint "ruff check" --color . \ No newline at end of file -- cgit v1.2.3