Skip to content

Merge pull request #1676 from IntelPython/fix-for-crash-gh-1654 #4346

Merge pull request #1676 from IntelPython/fix-for-crash-gh-1654

Merge pull request #1676 from IntelPython/fix-for-crash-gh-1654 #4346

# This is a workflow to format Python code with black formatter
name: Python Code Style
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
push:
branches: [master]
permissions: read-all
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# The isort job sorts all imports in .py, .pyx, .pxd files
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.5
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: jamescurtin/isort-action@master
with:
configuration: "--check-only"
black:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4.1.5
# Set up a Python environment for use in actions
- uses: actions/setup-python@v5
with:
python-version: '3.11'
# Run black code formatter
- uses: psf/black@stable
with:
src: "."
options: "--check"
version: "22.12.0"
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint with flake8
uses: py-actions/flake8@v2