Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Tests
name: Run Tests on Production Environment

on:
push:
Expand All @@ -25,38 +25,50 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest
pip install ".[test]"
- name: Set environment variables
run: |
echo "TEAM_API_KEY=${{ secrets.TEAM_API_KEY_PROD }}" >> $GITHUB_ENV
echo "BACKEND_URL=https://platform-api.aixplain.com" >> $GITHUB_ENV
echo "MODELS_RUN_URL=https://models.aixplain.com/api/v1/execute" >> $GITHUB_ENV
echo "PIPELINES_RUN_URL=https://platform-api.aixplain.com/assets/pipeline/execution/run" >> $GITHUB_ENV

- name: Run general_assets
- name: Run Unit Tests
continue-on-error: true
run: python -m pytest tests/unit

- name: Run General Assets
continue-on-error: true
run: python -m pytest tests/functional/general_assets

- name: Run File Asset
continue-on-error: true
run: python -m pytest tests/functional/file_asset

- name: Run Agent
continue-on-error: true
run: python -m pytest tests/functional/agent

- name: Run Team Agent
continue-on-error: true
run: python -m pytest tests/functional/team_agent

- name: Run Data
continue-on-error: true
run: python -m pytest tests/functional/data_asset

- name: Run Becnhmark
- name: Run Benchmark
continue-on-error: true
run: python -m pytest tests/functional/benchmark

- name: Run Pipelines
continue-on-error: true
run: python -m pytest tests/functional/pipelines

- name: Run Api Key
continue-on-error: true
run: python -m pytest tests/functional/apikey

- name: Run Finetuner
continue-on-error: true
run: python -m pytest tests/functional/finetune
227 changes: 20 additions & 207 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Tests
name: Run Tests on Test Environment

on:
push:
Expand All @@ -10,8 +10,9 @@ on:
workflow_dispatch:

jobs:
test-general-assets:
test:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -24,239 +25,51 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest
pip install ".[test]"

- name: Set environment variables
run: |
echo "TEAM_API_KEY=${{ secrets.TEAM_API_KEY }}" >> $GITHUB_ENV
echo "BACKEND_URL=https://test-platform-api.aixplain.com/" >> $GITHUB_ENV
echo "BACKEND_URL=https://test-platform-api.aixplain.com" >> $GITHUB_ENV
echo "MODELS_RUN_URL=https://test-models.aixplain.com/api/v1/execute" >> $GITHUB_ENV
echo "PIPELINES_RUN_URL=https://test-platform-api.aixplain.com/assets/pipeline/execution/run" >> $GITHUB_ENV

- name: Run general_assets
run: python -m pytest tests/functional/general_assets

test-file-asset:
runs-on: ubuntu-latest
needs: test-general-assets
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest
- name: Run Unit Tests
continue-on-error: true
run: python -m pytest tests/unit

- name: Set environment variables
run: |
echo "TEAM_API_KEY=${{ secrets.TEAM_API_KEY }}" >> $GITHUB_ENV
echo "BACKEND_URL=https://test-platform-api.aixplain.com/" >> $GITHUB_ENV
echo "MODELS_RUN_URL=https://test-models.aixplain.com/api/v1/execute" >> $GITHUB_ENV
echo "PIPELINES_RUN_URL=https://test-platform-api.aixplain.com/assets/pipeline/execution/run" >> $GITHUB_ENV
- name: Run General Assets
continue-on-error: true
run: python -m pytest tests/functional/general_assets

- name: Run File Asset
continue-on-error: true
run: python -m pytest tests/functional/file_asset

test-agent:
runs-on: ubuntu-latest
needs: test-file-asset
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest

- name: Set environment variables
run: |
echo "TEAM_API_KEY=${{ secrets.TEAM_API_KEY }}" >> $GITHUB_ENV
echo "BACKEND_URL=https://test-platform-api.aixplain.com/" >> $GITHUB_ENV
echo "MODELS_RUN_URL=https://test-models.aixplain.com/api/v1/execute" >> $GITHUB_ENV
echo "PIPELINES_RUN_URL=https://test-platform-api.aixplain.com/assets/pipeline/execution/run" >> $GITHUB_ENV

- name: Run Agent
continue-on-error: true
run: python -m pytest tests/functional/agent

test-team-agent:
runs-on: ubuntu-latest
needs: test-agent
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest

- name: Set environment variables
run: |
echo "TEAM_API_KEY=${{ secrets.TEAM_API_KEY }}" >> $GITHUB_ENV
echo "BACKEND_URL=https://test-platform-api.aixplain.com/" >> $GITHUB_ENV
echo "MODELS_RUN_URL=https://test-models.aixplain.com/api/v1/execute" >> $GITHUB_ENV
echo "PIPELINES_RUN_URL=https://test-platform-api.aixplain.com/assets/pipeline/execution/run" >> $GITHUB_ENV

- name: Run Team Agent
continue-on-error: true
run: python -m pytest tests/functional/team_agent

test-data-asset:
runs-on: ubuntu-latest
needs: test-team-agent
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest

- name: Set environment variables
run: |
echo "TEAM_API_KEY=${{ secrets.TEAM_API_KEY }}" >> $GITHUB_ENV
echo "BACKEND_URL=https://test-platform-api.aixplain.com/" >> $GITHUB_ENV
echo "MODELS_RUN_URL=https://test-models.aixplain.com/api/v1/execute" >> $GITHUB_ENV
echo "PIPELINES_RUN_URL=https://test-platform-api.aixplain.com/assets/pipeline/execution/run" >> $GITHUB_ENV

- name: Run Data
continue-on-error: true
run: python -m pytest tests/functional/data_asset

test-benchmark:
runs-on: ubuntu-latest
needs: test-data-asset
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest

- name: Set environment variables
run: |
echo "TEAM_API_KEY=${{ secrets.TEAM_API_KEY }}" >> $GITHUB_ENV
echo "BACKEND_URL=https://test-platform-api.aixplain.com/" >> $GITHUB_ENV
echo "MODELS_RUN_URL=https://test-models.aixplain.com/api/v1/execute" >> $GITHUB_ENV
echo "PIPELINES_RUN_URL=https://test-platform-api.aixplain.com/assets/pipeline/execution/run" >> $GITHUB_ENV

- name: Run Benchmark
continue-on-error: true
run: python -m pytest tests/functional/benchmark

test-pipelines:
runs-on: ubuntu-latest
needs: test-benchmark
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest

- name: Set environment variables
run: |
echo "TEAM_API_KEY=${{ secrets.TEAM_API_KEY }}" >> $GITHUB_ENV
echo "BACKEND_URL=https://test-platform-api.aixplain.com/" >> $GITHUB_ENV
echo "MODELS_RUN_URL=https://test-models.aixplain.com/api/v1/execute" >> $GITHUB_ENV
echo "PIPELINES_RUN_URL=https://test-platform-api.aixplain.com/assets/pipeline/execution/run" >> $GITHUB_ENV

- name: Run Pipelines
continue-on-error: true
run: python -m pytest tests/functional/pipelines

test-api-key:
runs-on: ubuntu-latest
needs: test-pipelines
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest

- name: Set environment variables
run: |
echo "TEAM_API_KEY=${{ secrets.TEAM_API_KEY }}" >> $GITHUB_ENV
echo "BACKEND_URL=https://test-platform-api.aixplain.com/" >> $GITHUB_ENV
echo "MODELS_RUN_URL=https://test-models.aixplain.com/api/v1/execute" >> $GITHUB_ENV
echo "PIPELINES_RUN_URL=https://test-platform-api.aixplain.com/assets/pipeline/execution/run" >> $GITHUB_ENV

- name: Run Api Key
continue-on-error: true
run: python -m pytest tests/functional/apikey

test-finetuner:
runs-on: ubuntu-latest
needs: test-api-key
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest

- name: Set environment variables
run: |
echo "TEAM_API_KEY=${{ secrets.TEAM_API_KEY }}" >> $GITHUB_ENV
echo "BACKEND_URL=https://test-platform-api.aixplain.com/" >> $GITHUB_ENV
echo "MODELS_RUN_URL=https://test-models.aixplain.com/api/v1/execute" >> $GITHUB_ENV
echo "PIPELINES_RUN_URL=https://test-platform-api.aixplain.com/assets/pipeline/execution/run" >> $GITHUB_ENV

- name: Run Finetuner
run: python -m pytest tests/functional/finetune
continue-on-error: true
run: python -m pytest tests/functional/finetune
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ model-builder = [
test = [
"pytest>=6.1.0",
"docker>=6.1.3",
"requests-mock>=1.11.0"
"requests-mock>=1.11.0",
"pytest-mock>=3.10.0"
]
Loading