mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 09:08:31 +00:00
50 lines
994 B
YAML
50 lines
994 B
YAML
name: Run Tests
|
|
|
|
on: [pull_request]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
OPENAI_API_KEY: fake-api-key
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.11.9"
|
|
|
|
- name: Install Requirements
|
|
run: |
|
|
set -e
|
|
pip install poetry
|
|
poetry lock && poetry install
|
|
|
|
- name: Print Environment Information
|
|
run: |
|
|
python --version
|
|
pip list
|
|
env
|
|
|
|
- name: Clear Caches
|
|
run: |
|
|
sudo rm -rf ~/.cache/pypoetry
|
|
sudo rm -rf ~/.cache/pip
|
|
|
|
- name: Run tests
|
|
run: poetry run pytest tests --capture=tee-sys --junitxml=test-results.xml
|
|
|
|
- name: Upload Test Results
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: test-results
|
|
path: test-results.xml
|