diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 2f09f02..d5f1c63 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -1,15 +1,31 @@ -name: pytest +name: Unittest Execution (pytest) -on: [push] +on: + push: + branches: [main] + pull_request: + types: [opened, synchronize, reopened] jobs: pytest: runs-on: ubuntu-latest name: "pytest" + steps: + - uses: actions/checkout@v4 + + - name: Install uv + run: pip install uv + - uses: davidslusser/actions_python_pytest@v1.0.1 with: src: "" - options: "" - pip_install_command: "pip install -e .[dev]" - python_version: "3.11" + options: "--cov --cov-report=term-missing --cov-report=xml" + pip_install_command: "uv pip install -e .[dev] --system" + + - name: Upload coverage to CodeAnt AI + if: github.ref == 'refs/heads/main' + uses: CodeAnt-AI/codeant-coverage-action@v0.0.5 + with: + access_token: ${{ secrets.ACCESS_TOKEN_GITHUB }} + coverage_file: coverage.xml