Bump ruff from 0.3.4 to 0.4.5 #31
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python application | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of SonarCloud analysis | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install .[dev] | |
- name: Test | |
run: | | |
green --run-coverage | |
coverage xml # SonarCloud needs a Cobertura compatible XML coverage report | |
python -m xmlrunner discover --output-file build/xunit.xml # SonarCloud needs a JUnit compatible XML report | |
- name: Quality | |
run: | | |
ruff check . | |
ruff format --check . | |
mypy src tests | |
vulture src tests | |
fixit lint . | |
bandit -q -r src tests | |
- name: SonarCloud scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
if: env.SONAR_TOKEN != null |