Skip to content

fix mypy and ruff errors #37

fix mypy and ruff errors

fix mypy and ruff errors #37

Workflow file for this run

name: Check coverage
on:
push:
branches:
- main
- dev
paths:
- bin/**
- src/**
- tests/**
- setup.py
- pyproject.toml
- .github/workflows/**
pull_request:
branches:
- main
- dev
paths:
- bin/**
- src/**
- tests/**
- setup.py
- pyproject.toml
- .github/workflows/**
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install nplinker and its dependencies
run: |
python3 -m pip install -e .[dev]
install-nplinker-deps --run-on-github
- name: Run unit tests with coverage
run: pytest --cov=nplinker --cov-report=xml --cov-report=term tests/unit
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{secrets.SONAR_TOKEN }}