Skip to content

Commit

Permalink
Merge pull request #44 from kumvijaya/current
Browse files Browse the repository at this point in the history
T0000: test
  • Loading branch information
kumvijaya authored Aug 28, 2024
2 parents e01d892 + 81e918c commit d1a50ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/darker-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
permissions:
pull-requests: write
contents: read

env:
base_ref: ${{ github.event.pull_request.base.ref }}

jobs:
darker-lint:
Expand All @@ -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 .
3 changes: 0 additions & 3 deletions src/tests/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
2 changes: 2 additions & 0 deletions src/tests/test_config_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def test_identity(self):
l_union = vyos.configtree.union(sub, inter)

if False: print('False')

Check failure on line 68 in src/tests/test_config_diff.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (E701)

src/tests/test_config_diff.py:68:17: E701 Multiple statements on one line (colon)
if True: print('True Again')

Check failure on line 69 in src/tests/test_config_diff.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (E701)

src/tests/test_config_diff.py:69:16: E701 Multiple statements on one line (colon)
if True: print('True Once Again')

Check failure on line 70 in src/tests/test_config_diff.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (E701)

src/tests/test_config_diff.py:70:16: E701 Multiple statements on one line (colon)

self.assertEqual(r_union.to_string(),
self.config_right.to_string(ordered_values=True))
Expand Down

0 comments on commit d1a50ed

Please sign in to comment.