changed branch for ai reviewing #1
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: Codacy Analysis & Coverage | |
on: | |
push: | |
branches: | |
- testing-ai-code-reviewing | |
pull_request: | |
branches: | |
- testing-ai-code-reviewing | |
jobs: | |
codacy-analysis-cli: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Run Tests and Generate Coverage Report | |
run: | | |
pip install pytest pytest-cov | |
pytest --cov=my_project --cov-report=xml # Generates coverage.xml | |
- name: Run Codacy Analysis CLI | |
uses: codacy/codacy-analysis-cli-action@master | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
- name: Upload Coverage Report to Codacy | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: coverage.xml |