Skip to content

Commit

Permalink
Merge pull request #33 from Ostorlab/switch_to_ruff_linter_and_formatter
Browse files Browse the repository at this point in the history
Feat: update workflow to use ruff
  • Loading branch information
3asm authored Jan 17, 2024
2 parents d19572a + 00bff5a commit 3581a0c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 460 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Dockerfile
requirements.txt
.github
tests
.pylintrc
README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
---
# This workflow use pylint:
# - Install Python dependencies.
# - Run pylint for each of the supported Python versions.
# Pylint will only fail without fixing any of the errors or warnings.

name: Pylint & Mypy
name: Code Quality Check

on:
push:
Expand All @@ -15,13 +9,14 @@ on:
- '*'

jobs:
build:
pre-commit:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -32,19 +27,21 @@ jobs:
cache-dependency-path: |
**/requirement.txt
**/test-requirement.txt
- name: Install dependencies.
- name: Installing dependencies.
run: |
python -m pip install --upgrade pip
python -m pip install -r requirement.txt
python -m pip install -r tests/test-requirement.txt
- name: Running Black.
uses: psf/black@stable
- name: Checking code formatting.
uses: chartboost/ruff-action@v1
with:
options: "--check"
args: format --check

- name: Running linter.
run: |
pylint --rcfile=.pylintrc --ignore=tests/ agent/
pylint --rcfile=.pylintrc -d C0103,W0613 tests/
uses: chartboost/ruff-action@v1

- name: Running static types checker.
run: |
mypy
Loading

0 comments on commit 3581a0c

Please sign in to comment.