From 01c9c7478dd4c1da686118b3a8c1bbbb30801e71 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Tue, 3 Oct 2023 18:48:43 +0100 Subject: [PATCH] adding importlib-metadata to the pip install --- .github/workflows/api-integration-test.yml | 148 ++++++++++----------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index b84bcf4e1a3d..313b65ea0605 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -17,80 +17,80 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 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@v3 - - - 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.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: Install Python Dependencies - run: | - pip install toml pytest uvicorn - - # - 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 - # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: | - python openbb_platform/dev_install.py -e - - - name: Populate System Setting Files - run: | - mkdir -p ${{ github.workspace }}/.openbb_platform - touch ${{ github.workspace }}/.openbb_platform/system_settings.json - echo '{"log_collect":false}' > ${{ github.workspace }}/.openbb_platform/system_settings.json - - - name: Create and Populate user_settings.json from GitHub Secrets - run: | - touch ${{ github.workspace }}/.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 }}" - } - }' > ${{ github.workspace }}/.openbb_platform/user_settings.json - - - name: Launch the Uvicorn Process - run: | - uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload & - - - name: Wait for 1 minute - run: | - sleep 60 - - - name: Run Integration Tests - run: | - pytest -m integration + - 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@v3 + + - 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.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: Install Python Dependencies + run: | + pip install toml pytest uvicorn importlib-metadata + + # - 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 + # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: | + python openbb_platform/dev_install.py -e + + - name: Populate System Setting Files + run: | + mkdir -p ${{ github.workspace }}/.openbb_platform + touch ${{ github.workspace }}/.openbb_platform/system_settings.json + echo '{"log_collect":false}' > ${{ github.workspace }}/.openbb_platform/system_settings.json + + - name: Create and Populate user_settings.json from GitHub Secrets + run: | + touch ${{ github.workspace }}/.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 }}" + } + }' > ${{ github.workspace }}/.openbb_platform/user_settings.json + + - name: Launch the Uvicorn Process + run: | + uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload & + + - name: Wait for 1 minute + run: | + sleep 60 + + - name: Run Integration Tests + run: | + pytest -m integration # - name: Upload summary to Slack # uses: adrey/slack-file-upload-action@master