Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitflow Implementations #3902

Merged
merged 8 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Nightly Build

env:
OPENBB_ENABLE_QUICK_EXIT: true
OPENBB_LOG_COLLECT: false
OPENBB_USE_ION: false
OPENBB_USE_PROMPT_TOOLKIT: false
PIP_DEFAULT_TIMEOUT: 100
PYTHONNOUSERSITE: 1

on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- develop

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Windows-Build:
name: Windows10 Build
runs-on: [self-hosted, Windows, x64]
# Configuring -------------
steps:
- name: Setup Windows Git Configuration # This is under the assumption that git is already installed on the system
run: |
Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1
git config --system core.longpaths true
- name: Checkout
uses: actions/[email protected]
- name: Activate Base & Create OpenBB Environment
run: |
conda activate base
conda env create -n obb --file build/conda/conda-3-9-env-full.yaml
conda init
conda activate obb
conda env list
- name: Poetry Install
# Conda activate needs to be run every time because of the way that the workflow steps work
# on powershell where it creates a new shell every time for every step
run: |
conda activate obb
poetry install
- name: Poetry Install Portfolio Optimization and Forecasting Toolkits
run: |
conda activate obb
poetry install -E all
- name: Poetry Install Installer
run: |
conda activate obb
poetry install -E installer
- name: Install Specific Papermill
run: |
conda activate obb
pip uninstall papermill -y
pip install git+https://github.com/nteract/papermill.git@main
# Building ------------
- name: Build Terminal.spec file
run: |
conda activate obb
pyinstaller build/pyinstaller/terminal.spec --clean
- name: Move Files into App Folder
run: cp -r .\dist\OpenBBTerminal\ .\build\nsis\app\
# don't need this because log collection is turned off
# - name: Remove Log Data
# run: Remove-Item .\build\nsis\app\openbb_terminal\logs\ -Recurse
- name: Build Exe File
run: |
conda activate obb
C:\'.\Program Files (x86)\'\nsis\makensis.exe .\build\nsis\setup.nsi
- name: Save Build Artifact
uses: actions/upload-artifact@v3
with:
name: Windows EXE Artifact
path: '.\build\nsis\OpenBB Terminal Setup.exe'
- name: Run Integration Tests
run: |
dist\OpenBBTerminal\OpenBBTerminal.exe C:\Users\Administrator\actions-runner\_work\OpenBBTerminal\OpenBBTerminal\openbb_terminal\miscellaneous\scripts -t
# Cleaning ------------------------
# Make sure to add Remove-Item C:\Users\Administrator\Desktop\OPENBB-exports -Recurse whenever integration tests get fixed
- name: Remove Previous Build
run: |
Remove-Item '.\build\nsis\OpenBB Terminal Setup.exe' -Recurse
Remove-Item .\build\nsis\app\ -Recurse
Remove-Item .\dist\ -Recurse
Remove-Item .\build\terminal\ -Recurse
- name: Deactivate & Remove Conda Environment
run: |
conda deactivate obb
conda deactivate base
conda env remove -n obb
Remove-Item C:\Users\Administrator\miniconda3\envs\obb\ -Recurse
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ env:
OPENBB_USE_ION: false
OPENBB_USE_PROMPT_TOOLKIT: false
PIP_DEFAULT_TIMEOUT: 100

on: [workflow_dispatch]

jobs:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- develop
- main
types: [opened, synchronize]
push:
branches:
- develop
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -97,7 +101,7 @@ jobs:
name: Vanilla Python Tests - ${{ matrix.python-version }}
needs: [python-changes, base-test]
runs-on: ${{ matrix.os }}
if: needs.python-changes.outputs.python-changes == 'true' && github.event.pull_request.base.ref == 'develop'
if: needs.python-changes.outputs.python-changes == 'true' && github.event.pull_request.base.ref == 'develop' && github.event.pull_request.merged != true
strategy:
fail-fast: true
matrix:
Expand Down
1 change: 1 addition & 0 deletions gitflow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("Hello, World!")
2 changes: 1 addition & 1 deletion tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def no_dfs(args: list, kwargs: dict) -> bool:
for item in kwargs.values():
if isinstance(item, pd.DataFrame):
return False
return True
return True