Skip to content

Commit

Permalink
Fix Unit Test (#4298)
Browse files Browse the repository at this point in the history
* Fix Unit Test

* Added comments

* remove punctuation

* Edit depth

* fix linting
  • Loading branch information
luqmanbello authored Feb 20, 2023
1 parent 382874b commit 8dff6b1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
check-changes: ${{ steps.check-changes.outputs.check-changes }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v1 # v1 is used to preserve the git history and works with the git diff command
with:
fetch-depth: 100
# The GitHub token is preserved by default but this job doesn't need
Expand All @@ -46,20 +46,16 @@ jobs:
- name: Check for changes to files to trigger unit test
id: check-changes
run: |
source_branch=$(jq -r .pull_request.head.ref "$GITHUB_EVENT_PATH")
target_branch=$(jq -r .pull_request.base.ref "$GITHUB_EVENT_PATH")
current_branch=$(jq -r .pull_request.base.ref "$GITHUB_EVENT_PATH")
if git diff --name-only origin/$target_branch HEAD | grep -E ".py$|openbb_terminal\/.*|pyproject.toml|poetry.lock|requirements.txt|requirements-full.txt"; then
if git diff --name-only origin/$current_branch HEAD | grep -E ".py$|openbb_terminal\/.*|pyproject.toml|poetry.lock|requirements.txt|requirements-full.txt"; then
echo "check-changes=true" >> $GITHUB_OUTPUT
else
echo "check-changes=false" >> $GITHUB_OUTPUT
fi
- name: Show output of previous step
run: |
# echo "python-changes=${{ steps.python-changes.outputs.python-changes }}"
# echo "folder-changes=${{ steps.folder-changes.outputs.folder-changes }}"
echo "check-changes=${{ steps.check-changes.outputs.check-changes }}"
run: echo "check-changes=${{ steps.check-changes.outputs.check-changes }}"

base-test:
name: Base Tests - Ubuntu-latest - Python 3.9
Expand Down

0 comments on commit 8dff6b1

Please sign in to comment.