Skip to content

Pydriller workflow #2050

Pydriller workflow

Pydriller workflow #2050

name: Pydriller workflow
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python: [ '3.8.x', '3.9.x', '3.10.x', '3.11.x', '3.12.x' ]
name: Python ${{ matrix.python }} sample on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies and unzip test-repos
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install pytest-cov
unzip test-repos
- name: Mypy
run: |
pip install mypy
mypy --ignore-missing-imports pydriller/ tests/
- name: Lint with flake8
run: |
pip install flake8
flake8
- name: Run pytest
run: pytest --junitxml=testpulse/test_run/test_results.xml --cov-report xml:testpulse/test_run/coverage.xml --cov=pydriller tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
- name: Upload to testpulse
if: '!cancelled()'
env:
TESTPULSE_TOKEN: ${{ secrets.TESTPULSE_TOKEN }}
run: |
pip install testpulse-uploader
testpulse-upload -tr ".*testpulse\/test_run\/.*\.xml" -tr ".*testpulse\\test_run\\.*\.xml" --config-file .testpulse.yaml -lv ${{ matrix.python }} -tt unit