Run the qodo-cover action (Python) #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run the qodo-cover action (Python) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| desired_coverage: | |
| description: "Desired coverage percentage" | |
| required: false | |
| default: "70" | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| jobs: | |
| run-qodo-cover-python: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.ref }} | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3 python3-dev python3-pip | |
| python3 --version | |
| - name: Install app dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r templated_tests/python_fastapi/requirements.txt | |
| - name: Qodo Cover | |
| uses: qodo-ai/qodo-ci/.github/actions/[email protected] | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| project_language: python | |
| project_root: templated_tests/python_fastapi | |
| code_coverage_report_path: templated_tests/python_fastapi/coverage.xml | |
| test_command: "pytest --cov=. --cov-report=xml --cov-report=term" | |
| model: gpt-4o | |
| desired_coverage: ${{ github.event.inputs.desired_coverage }} | |
| branch: ${{ github.ref_name }} | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |