Skip to content

Commit

Permalink
add: setup github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-burashnikov committed Oct 22, 2023
1 parent 42f715a commit cc272ce
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: black format
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
name: Setup python and black formatter
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.x
- run: pip install --upgrade pip
- run: pip install "black<24"

- name: Format with black
run: |
black --diff --check $(git ls-files '*.py')
25 changes: 25 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: mypy check

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.x

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy
- name: Type check with mypy
run: |
mypy --strict $(git ls-files '*.py')
8 changes: 8 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: ruff lint
on: [ push, pull_request ]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1

0 comments on commit cc272ce

Please sign in to comment.