run on label #19
Workflow file for this run
This file contains 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-pr action (Python) | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- labeled | |
permissions: | |
pull-requests: write # Allows commenting on pull requests | |
contents: write # Allows reading files and creating pull requests | |
jobs: | |
run-qodo-cover-pr-python: | |
# Only run if: | |
# 1. PR has the qodo-cover label | |
# 2. PR is open (not closed or draft) | |
if: | | |
contains(github.event.label.name, 'qodo-cover') && | |
github.event.pull_request.state == 'open' && | |
github.event.pull_request.draft == false | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout PR branch | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.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: 70 | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |