mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-07 09:52:13 +00:00
Merge branch 'develop' into feature/real_estate
This commit is contained in:
3
.github/workflows/branch-name-check.yml
vendored
3
.github/workflows/branch-name-check.yml
vendored
@@ -5,7 +5,7 @@ on:
|
||||
branches:
|
||||
- develop
|
||||
- main
|
||||
types: [opened, edited]
|
||||
types: [opened, synchronize, edited]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -18,7 +18,6 @@ jobs:
|
||||
source-branch: ${{ steps.branch-name-check.outputs.source-branch }}
|
||||
target-branch: ${{ steps.branch-name-check.outputs.target-branch }}
|
||||
steps:
|
||||
# Extract the source and target branches for the PR
|
||||
- name: Extract branch names
|
||||
id: branch-name-check
|
||||
run: |
|
||||
|
||||
2
.github/workflows/linting.yml
vendored
2
.github/workflows/linting.yml
vendored
@@ -8,6 +8,8 @@ env:
|
||||
PIP_DEFAULT_TIMEOUT: 100
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, edited]
|
||||
push:
|
||||
branches:
|
||||
- 'feature/*'
|
||||
|
||||
47
.github/workflows/unit-test.yml
vendored
47
.github/workflows/unit-test.yml
vendored
@@ -20,12 +20,10 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
check-files-changed:
|
||||
name: Check for changes to python files and the openbb_terminal folder
|
||||
name: Check for changes
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.merged != true
|
||||
outputs:
|
||||
python-changes: ${{ steps.python-changes.outputs.python-changes }}
|
||||
folder-changes: ${{ steps.folder-changes.outputs.folder-changes }}
|
||||
check-changes: ${{ steps.check-changes.outputs.check-changes }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -36,48 +34,23 @@ jobs:
|
||||
# to be able to push to GitHub.
|
||||
persist-credentials: false
|
||||
|
||||
# Check for changes to Python files to avoid running tests unnecessarily
|
||||
- name: python file check
|
||||
id: python-changes
|
||||
run: |
|
||||
# Extract the source and target branches for the PR
|
||||
source_branch=$(jq -r .pull_request.head.ref "$GITHUB_EVENT_PATH")
|
||||
target_branch=$(jq -r .pull_request.base.ref "$GITHUB_EVENT_PATH")
|
||||
|
||||
# Check for changes to Python code to avoid running tests unnecessarily
|
||||
if git diff --name-only origin/$target_branch HEAD | grep -E "\.py$"; then
|
||||
echo "python-changes=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "python-changes=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
# Check for changes to the openbb_terminal folder to avoid running tests unnecessarily
|
||||
- name: Check for changes to the openbb_terminal folder
|
||||
id: folder-changes
|
||||
run: |
|
||||
source_branch=$(jq -r .pull_request.head.ref "$GITHUB_EVENT_PATH")
|
||||
target_branch=$(jq -r .pull_request.base.ref "$GITHUB_EVENT_PATH")
|
||||
|
||||
if git diff --name-only origin/$target_branch HEAD | grep -E "openbb_terminal\/.*"; then
|
||||
echo "folder-changes=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "folder-changes=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
# combine the two checks into one
|
||||
- name: Check for changes to python files or the openbb_terminal folder
|
||||
# Check for changes to python files, lockfiles and the openbb_terminal folder
|
||||
- name: Check for changes to files to trigger unit test
|
||||
id: check-changes
|
||||
run: |
|
||||
if [ ${{ steps.python-changes.outputs.python-changes }} == 'true' ] || [ ${{ steps.folder-changes.outputs.folder-changes }} == 'true' ]; then
|
||||
source_branch=$(jq -r .pull_request.head.ref "$GITHUB_EVENT_PATH")
|
||||
target_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
|
||||
echo "check-changes=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "check-changes=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Show Output result for python-changes
|
||||
- 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 "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 }}"
|
||||
|
||||
base-test:
|
||||
|
||||
Reference in New Issue
Block a user