Skip to content

Commit

Permalink
Create style.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
myungkim930 authored Jul 3, 2024
1 parent 6931d42 commit 32189b7
Showing 1 changed file with 183 additions and 0 deletions.
183 changes: 183 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
name: style



on:

push:

branches: [main, develop]

pull_request:

branches: [main, develop]



jobs:

flake8:

runs-on: ${{ matrix.os }}

strategy:

matrix:

os: [ubuntu-latest]

python: [3.8]

steps:

- uses: actions/checkout@v2

- name: Set up Python

uses: actions/setup-python@v1

with:

python-version: ${{ matrix.python }}

architecture: x64

- name: Run flake8

run: |
pip install flake8
flake8 --version
flake8
isort:

runs-on: ${{ matrix.os }}

strategy:

matrix:

os: [ubuntu-latest]

python: [3.8]

steps:

- uses: actions/checkout@v2

- name: Set up Python

uses: actions/setup-python@v1

with:

python-version: ${{ matrix.python }}

architecture: x64

- name: Run isort

run: |
pip install isort
isort --version
isort .
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then exit 1; else echo "All clear"; fi
mypy:

runs-on: ${{ matrix.os }}

strategy:

matrix:

os: [ubuntu-latest]

python: [3.8]

steps:

- uses: actions/checkout@v2

- name: Set up Python

uses: actions/setup-python@v1

with:

python-version: ${{ matrix.python }}

architecture: x64

- name: Cache python modules

uses: actions/cache@v2

with:

path: ~/.cache/pip

key: ${{ runner.os }}-python-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}

- name: Install dependencies

run: |
pip install mypy
- name: Run mypy

run: |
mypy --version
mypy
black:

runs-on: ${{ matrix.os }}

strategy:

matrix:

os: [ubuntu-latest]

python: [3.8]

steps:

- uses: actions/checkout@v2

- name: Set up Python

uses: actions/setup-python@v2

with:

python-version: ${{ matrix.python }}

architecture: x64

- name: Run black

run: |
pip install black
black --version
black --check --diff .

0 comments on commit 32189b7

Please sign in to comment.