Skip to content

Run api tests as well #8

Run api tests as well

Run api tests as well #8

Workflow file for this run

name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: (Playbooks package) Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
cd python/packages/playbooks
poetry install
- name: (Playbooks package) Run tests
run: |
cd python/packages/playbooks
poetry run pytest tests/ --cov=src/playbooks --cov-report=xml
- name: (Website API) Install dependencies
run: |
cd website/api
pip install -r requirements.txt
pip install pytest pytest-cov
- name: (Website API) Run tests
run: |
cd website/api
pytest tests/ --cov=. --cov-report=xml -v
- name: Upload Playbooks package coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: playbooks-ai/playbooks
file: ./python/packages/playbooks/coverage.xml
fail_ci_if_error: true
flags: playbooks-package
- name: Upload API coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: playbooks-ai/playbooks
file: ./website/api/coverage.xml
fail_ci_if_error: true
flags: website-api