Add linkedin data api tools via RapidAPI #54
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - "*" | |
| paths: | |
| - '**.py' | |
| - 'pyproject.toml' | |
| - 'poetry.lock' | |
| - '.github/actions/test.yml' | |
| concurrency: | |
| group: mxtoai-tests | |
| cancel-in-progress: false | |
| jobs: | |
| backend-tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| name: backend tests | |
| env: | |
| X_API_KEY: "some-api-key" | |
| IS_PROD: "true" | |
| LITELLM_DEFAULT_MODEL_GROUP: ${{ secrets.LITELLM_DEFAULT_MODEL_GROUP }} | |
| # TODO: Ideally, this shouldn't be needed, remove later | |
| AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| id: setup-python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| - name: Load cached Poetry installation | |
| id: cached-poetry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.local | |
| key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install Poetry | |
| if: steps.cached-poetry.outputs.cache-hit != 'true' | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| virtualenvs-path: .venv | |
| installer-parallel: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install --no-interaction --with dev | |
| - name: Create LiteLLM config from secret | |
| env: | |
| MODEL_CONFIG_CONTENT: ${{ secrets.MODEL_CONFIG }} | |
| run: | | |
| echo "$MODEL_CONFIG_CONTENT" > litellm_config.toml | |
| echo "LITELLM_CONFIG_PATH=$(pwd)/litellm_config.toml" >> $GITHUB_ENV | |
| echo "Created litellm_config.toml and set LITELLM_CONFIG_PATH" | |
| - name: Run tests | |
| run: poetry run pytest -v --timeout 180 --cov-report=term-missing:skip-covered --cov-report=html:htmlcov --cov=mxtoai --log-cli-level=INFO --pytest-durations-min=5 | |
| - name: Upload pytest report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pytest-report | |
| path: pytest.xml | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: htmlcov/ |