mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
remove unused workflows and add permissions block to remaining jobs (#7223)
This commit is contained in:
41
.github/workflows/deploy-pypi-nightly.yml
vendored
41
.github/workflows/deploy-pypi-nightly.yml
vendored
@@ -1,41 +0,0 @@
|
||||
name: Deploy to PyPI - Nightly
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
deploy-nightly-pypi:
|
||||
name: Build and publish nightly distributions 📦 to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python 3.10
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install pypa/build
|
||||
run: >-
|
||||
python -m
|
||||
pip install
|
||||
build
|
||||
|
||||
- name: OpenBB Platform - Update version in pyproject.toml and Edit docs
|
||||
run: |
|
||||
sed -i 's/name = ".*"/name = "openbb-nightly"/' openbb_platform/pyproject.toml
|
||||
sed -i "3s/version = \"\(.*\)\"/version = \"\1.dev$(date +%Y%m%d%H%M)\"/" openbb_platform/pyproject.toml
|
||||
|
||||
- name: OpenBB Platform - Create the dynamically generated wheel
|
||||
run: |
|
||||
python -m pip install poetry toml
|
||||
python build/pypi/openbb_platform/nightly.py
|
||||
|
||||
- name: OpenBB Platform - Publish distribution 📦 to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
packages-dir: openbb_platform/dist/
|
||||
password: ${{ secrets.NIGHTLY_PYPI_API_TOKEN }}
|
||||
68
.github/workflows/deploy-test-pypi.yml
vendored
68
.github/workflows/deploy-test-pypi.yml
vendored
@@ -1,68 +0,0 @@
|
||||
name: Deploy the OpenBB Platform to Test PyPI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- feature/v4-pypi
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
deploy-test-pypi:
|
||||
name: Build and publish 📦 to TestPyPI
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python 3.10
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install pypa/build
|
||||
run: >-
|
||||
python -m
|
||||
pip install
|
||||
build
|
||||
--user
|
||||
|
||||
- name: OpenBBTerminal - Update version in pyproject.toml and Edit docs
|
||||
run: |
|
||||
sed -i 's/name = ".*"/name = "openbb-terminal-nightly"/' pyproject.toml
|
||||
sed -i "3s/version = \"\(.*\)\"/version = \"\1.dev$(date +%Y%m%d%H%M)\"/" pyproject.toml
|
||||
sed -i 's|pip install openbb-terminal|pip install openbb-terminal-nightly|g' ./website/pypi.md
|
||||
|
||||
- name: OpenBBTerminal - Build a binary wheel and a source tarball
|
||||
run: >-
|
||||
python -m
|
||||
build
|
||||
--sdist
|
||||
--wheel
|
||||
--outdir dist/
|
||||
.
|
||||
|
||||
- name: OpenBBTerminal - Publish distribution 📦 to Test PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
packages-dir: dist/
|
||||
password: ${{ secrets.TEST_PYPI_API_TOKEN_OBB_TERMINAL_NIGHTLY }}
|
||||
repository-url: https://test.pypi.org/legacy/
|
||||
|
||||
- name: OpenBB Platform - Update version in pyproject.toml and Edit docs
|
||||
run: |
|
||||
sed -i 's/name = ".*"/name = "openbb-nightly"/' openbb_platform/pyproject.toml
|
||||
sed -i "3s/version = \"\(.*\)\"/version = \"\1.dev$(date +%Y%m%d%H%M)\"/" openbb_platform/pyproject.toml
|
||||
|
||||
- name: OpenBB Platform - Create the dynamically generated wheel
|
||||
run: |
|
||||
python -m pip install poetry toml
|
||||
python build/pypi/openbb_platform/nightly.py
|
||||
|
||||
- name: OpenBB Platform - Publish distribution 📦 to Test PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
packages-dir: openbb_platform/dist/
|
||||
password: ${{ secrets.TEST_PYPI_API_TOKEN_OBB_PLATFORM_NIGHTLY }}
|
||||
repository-url: https://test.pypi.org/legacy/
|
||||
3
.github/workflows/draft-release.yml
vendored
3
.github/workflows/draft-release.yml
vendored
@@ -15,6 +15,9 @@ on:
|
||||
jobs:
|
||||
update_release_draft:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: read
|
||||
steps:
|
||||
- name: 📟 Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
6
.github/workflows/general-linting.yml
vendored
6
.github/workflows/general-linting.yml
vendored
@@ -23,6 +23,8 @@ jobs:
|
||||
code-linting:
|
||||
name: General Code Linting
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4.1.1 # actions/checkout v3.0.2
|
||||
@@ -74,6 +76,8 @@ jobs:
|
||||
markdown-link-check:
|
||||
name: Markdown Linting
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
name: Check out the code
|
||||
@@ -85,6 +89,8 @@ jobs:
|
||||
json-yaml-validate:
|
||||
name: JSON Check
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
3
.github/workflows/gh-branch-name-check.yml
vendored
3
.github/workflows/gh-branch-name-check.yml
vendored
@@ -14,6 +14,9 @@ concurrency:
|
||||
jobs:
|
||||
check-branch-name:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
3
.github/workflows/gh-pr-labels.yml
vendored
3
.github/workflows/gh-pr-labels.yml
vendored
@@ -7,6 +7,9 @@ on:
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
steps:
|
||||
# - uses: mheap/github-action-required-labels@v1
|
||||
# with:
|
||||
|
||||
4
.github/workflows/macos-build.yml
vendored
4
.github/workflows/macos-build.yml
vendored
@@ -17,6 +17,8 @@ jobs:
|
||||
M1-MacOs-Build:
|
||||
name: M1 MacOS Build
|
||||
runs-on: [self-hosted, macos, ARM64]
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
# Checkout repository main branch. this allows for the commit hashes to line up
|
||||
- name: Checkout
|
||||
@@ -119,6 +121,8 @@ jobs:
|
||||
Intel-MacOs-Build:
|
||||
name: Intel MacOS Build
|
||||
runs-on: [self-hosted, macos, x64]
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
# Checkout repository main branch. this allows for the commit hashes to line up
|
||||
- name: Checkout
|
||||
|
||||
115
.github/workflows/test-integration-platform.yml
vendored
115
.github/workflows/test-integration-platform.yml
vendored
@@ -1,115 +0,0 @@
|
||||
name: 🚉 Integration test Platform (API)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- release/*
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
api-integration-tests:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
OPENBB_API_AUTH: true
|
||||
OPENBB_API_USERNAME: "USER"
|
||||
OPENBB_API_PASSWORD: "PASS"
|
||||
|
||||
steps:
|
||||
- name: Slack Notification - Starting
|
||||
uses: act10ns/slack@v1
|
||||
with:
|
||||
status: starting
|
||||
channel: "#workflows"
|
||||
message: Starting API Integration Test...
|
||||
if: always()
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout specific ref
|
||||
if: github.event_name == 'pull_request'
|
||||
run: git fetch origin ${{ github.event.pull_request.head.ref }} && git checkout FETCH_HEAD
|
||||
|
||||
- name: Setup Python 3.10
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
architecture: x64
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m venv runner_env
|
||||
source runner_env/bin/activate
|
||||
pip install poetry toml
|
||||
python openbb_platform/dev_install.py -e
|
||||
|
||||
- name: Populate System Setting Files
|
||||
run: |
|
||||
mkdir -p ~/.openbb_platform
|
||||
touch ~/.openbb_platform/system_settings.json
|
||||
echo '{"log_collect":false}' > ~/.openbb_platform/system_settings.json
|
||||
cat ~/.openbb_platform/system_settings.json
|
||||
|
||||
- name: Create and Populate user_settings.json from GitHub Secrets
|
||||
run: |
|
||||
touch ~/.openbb_platform/user_settings.json
|
||||
echo '{
|
||||
"credentials": {
|
||||
"benzinga_api_key": "${{ secrets.BENZINGA_API_KEY }}",
|
||||
"fmp_api_key": "${{ secrets.FMP_API_KEY }}",
|
||||
"polygon_api_key": "${{ secrets.POLYGON_API_KEY }}",
|
||||
"alpha_vantage_api_key": "${{ secrets.ALPHA_VANTAGE_API_KEY }}",
|
||||
"fred_api_key": "${{ secrets.FRED_API_KEY }}",
|
||||
"intrinio_api_key": "${{ secrets.INTRINIO_API_KEY }}",
|
||||
"tradingeconomics_api_key": "${{ secrets.TRADINGECONOMICS_API_KEY }}",
|
||||
"quandl_api_key": "${{ secrets.QUANDL_API_KEY }}",
|
||||
"biztoc_api_key": "${{ secrets.BIZTOC_API_KEY }}",
|
||||
"nasdaq_api_key": "${{ secrets.NASDAQ_API_KEY }}",
|
||||
"tiingo_token": "${{ secrets.TIINGO_TOKEN }}"
|
||||
}
|
||||
}' > ~/.openbb_platform/user_settings.json
|
||||
|
||||
- name: Build openbb
|
||||
run: |
|
||||
source runner_env/bin/activate
|
||||
python -c "import openbb; openbb.build()"
|
||||
|
||||
- name: Launch the Uvicorn Process
|
||||
run: |
|
||||
source runner_env/bin/activate
|
||||
uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload &
|
||||
|
||||
- name: Wait for 42 seconds
|
||||
run: sleep 42
|
||||
|
||||
- name: Check installed packages
|
||||
run: |
|
||||
source runner_env/bin/activate
|
||||
pip list
|
||||
|
||||
- name: Run Integration Tests
|
||||
run: |
|
||||
source runner_env/bin/activate
|
||||
pytest openbb_platform -m integration
|
||||
|
||||
- name: Upload summary to Slack
|
||||
uses: adrey/slack-file-upload-action@master
|
||||
with:
|
||||
token: ${{ secrets.SLACK_API_TOKEN }}
|
||||
initial_comment: "API Integration test summary"
|
||||
title: "Integration test summary"
|
||||
path: summary.txt
|
||||
channel: ${{ secrets.SLACK_CHANNEL_ID }}
|
||||
|
||||
- name: Slack Notification - Success/Failure
|
||||
uses: act10ns/slack@v1
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
steps: ${{ toJson(steps) }}
|
||||
channel: "#workflows"
|
||||
if: always()
|
||||
4
.github/workflows/test-unit-cli.yml
vendored
4
.github/workflows/test-unit-cli.yml
vendored
@@ -14,6 +14,8 @@ concurrency:
|
||||
jobs:
|
||||
unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
@@ -36,7 +38,7 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('cli/poetry.lock') }}
|
||||
key: ${{ runner.os }}-pip-${{ matrix.python_version }}-${{ hashFiles('cli/poetry.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
|
||||
4
.github/workflows/test-unit-platform.yml
vendored
4
.github/workflows/test-unit-platform.yml
vendored
@@ -14,6 +14,8 @@ concurrency:
|
||||
jobs:
|
||||
unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
@@ -36,7 +38,7 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('openbb_platform/poetry.lock') }}
|
||||
key: ${{ runner.os }}-pip-${{ matrix.python_version }}-${{ hashFiles('openbb_platform/poetry.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
|
||||
Reference in New Issue
Block a user