Skip to content

Commit

Permalink
style check
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jun 28, 2024
1 parent 50b6ed7 commit f6ec425
Showing 1 changed file with 23 additions and 33 deletions.
56 changes: 23 additions & 33 deletions .github/workflows/check_code_quality.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
name: check_code_quality
name: Code Quality

on:
push:
branches: [ main ]
paths:
- "optimum/**.py"
- "tests/**.py"
- "examples/**.py"
branches: [main]

pull_request:
branches: [ main ]
paths:
- "optimum/**.py"
- "tests/**.py"
- "examples/**.py"
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -29,25 +21,23 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Create and start a virtual environment
run: |
python -m venv venv
source venv/bin/activate
- name: Install dependencies
run: |
source venv/bin/activate
pip install --upgrade pip
pip install .[quality]
- name: Check style with black
run: |
source venv/bin/activate
black --check .
- name: Check style with ruff
run: |
source venv/bin/activate
ruff .
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install --upgrade pip
pip install .[quality]
- name: Check style with black
run: |
black --check .
- name: Check style with ruff
run: |
ruff .

0 comments on commit f6ec425

Please sign in to comment.