mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-02 07:23:25 +00:00
Integration test environment template
This commit is contained in:
@@ -32,48 +32,27 @@ jobs:
|
||||
if: github.event_name == 'pull_request'
|
||||
run: git fetch origin ${{ github.event.pull_request.head.ref }} && git checkout FETCH_HEAD
|
||||
|
||||
# - name: Setup Python 3.9
|
||||
# uses: actions/setup-python@v4
|
||||
# with:
|
||||
# python-version: "3.9"
|
||||
# architecture: x64
|
||||
- name: Setup Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.9"
|
||||
architecture: x64
|
||||
|
||||
# - name: Install Poetry
|
||||
# uses: snok/install-poetry@v1
|
||||
# with:
|
||||
# version: 1.4.0
|
||||
# virtualenvs-create: true
|
||||
# virtualenvs-in-project: true
|
||||
- name: Load cached venv
|
||||
id: cached-python-environment
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ github.workspace }}/.venv
|
||||
key: venv-${{ runner.os }}-v1-${{ hashFiles('**/poetry.lock', '**/dev_install.py') }}
|
||||
|
||||
- name: Setup Conda
|
||||
- name: Install Dependencies
|
||||
if: steps.cached-python-environment.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
|
||||
bash miniconda.sh -b -p $HOME/miniconda
|
||||
echo "$HOME/miniconda/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Create and Activate Conda Environment
|
||||
run: |
|
||||
conda create -n obb-38 python=3.8 -y
|
||||
echo "conda activate obb-38" >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
# - name: Configure Poetry
|
||||
# run: poetry config virtualenvs.in-project true
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install toml pytest uvicorn importlib-metadata requests
|
||||
|
||||
# - name: Load cached venv
|
||||
# id: cached-poetry-dependencies
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# path: .venv
|
||||
# key: venv-${{ runner.os }}-v1-${{ hashFiles('**/poetry.lock', '**/dev_install.py') }}
|
||||
|
||||
- name: Install obb Dependencies
|
||||
run: |
|
||||
python ${{ github.workspace }}/openbb_platform/dev_install.py -e
|
||||
python -m pip install -U virtualenv pip
|
||||
python -m virtualenv ${{ github.workspace }}/.venv
|
||||
${{ github.workspace }}/.venv/bin/python -m pip install pytest \
|
||||
./openbb_platform
|
||||
# Add the extensions you want to test within this workflow here
|
||||
|
||||
- name: Populate System Setting Files
|
||||
run: |
|
||||
@@ -103,21 +82,21 @@ jobs:
|
||||
|
||||
- name: Run Integration Tests
|
||||
run: |
|
||||
pytest ${{ github.workspace }}/openbb_platform -m integration
|
||||
${{ github.workspace }}/.venv/bin/pytest ${{ github.workspace }}/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: 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()
|
||||
- name: Slack Notification - Success/Failure
|
||||
uses: act10ns/slack@v1
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
steps: ${{ toJson(steps) }}
|
||||
channel: "#workflows"
|
||||
if: always()
|
||||
Reference in New Issue
Block a user