updated workflow #2
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 | |
strategy: | |
matrix: | |
python-version: [ "3.10.13" ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e . | |
pip install scikit-learn | |
- name: Run Tests and Generate Coverage Report | |
run: | | |
wget https://files.dice-research.org/projects/Ontolearn/KGs.zip | |
unzip KGs.zip | |
pip install pytest pytest-cov | |
pytest --cov=tests --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 |