Skip to content

ci: add Codecov integration to workflows #1

ci: add Codecov integration to workflows

ci: add Codecov integration to workflows #1

Workflow file for this run

name: CI
on:
push:
branches: [develop]
pull_request:
branches: [develop]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.8.2 python -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install --with dev
- name: Run pre-commit hooks
run: poetry run make pre_commit
- name: Run tests with coverage
run: poetry run pytest --cov=nemo_guardrails tests/ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
directory: ./coverage/reports/
env_vars: PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: python
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true