remove unused workflows and add permissions block to remaining jobs (#7223)

This commit is contained in:
Danglewood
2025-09-26 10:19:57 -07:00
committed by GitHub
parent 6dc06a3c9d
commit 08019b2d76
10 changed files with 25 additions and 226 deletions

View File

@@ -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 }}

View File

@@ -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/

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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:

View File

@@ -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

View File

@@ -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()

View File

@@ -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-

View File

@@ -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-