Skip to content

Commit

Permalink
🔧 misc(CI): lint with Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo committed Nov 23, 2024
1 parent 3d2be78 commit b6d0cec
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ on:
branches:
- main
schedule:
- cron: "31 2 * * 0"
- cron: "33 3 * * 0"

env:
PYTHON_VERSION: "3.11"

jobs:
test:
Expand All @@ -23,11 +26,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ env.PYTHON_VERSION }}
cache: "poetry"
- name: Install Dependencies
run: |
pip install poetry
poetry install --all-extras
pipx install poetry
poetry install --with dev
- name: Run Tests with Coverage
run: poetry run pytest --cov=shuku --cov-report xml
- name: Upload coverage reports to Codecov
Expand All @@ -48,25 +52,29 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ env.PYTHON_VERSION }}
cache: "poetry"
- name: Install Dependencies
run: |
pip install poetry
poetry install --all-extras
pipx install poetry
poetry install --with dev
- name: Type Check
run: poetry run mypy shuku

style_check:
name: Style check with Black
lint:
name: Lint with Ruff
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Black
run: pip install black
- name: Check code formatting with Black
run: black --check shuku
python-version: ${{ env.PYTHON_VERSION }}
cache: "poetry"
- name: Install Dependencies
run: |
pipx install poetry
poetry install --with dev
- name: Check with Ruff
run: poetry run ruff check shuku

0 comments on commit b6d0cec

Please sign in to comment.