Skip to content

Commit 00f1181

Browse files
Add github workflow to run black and isort on pull request (#74)
* Add github workflow to run black and isort on pull request * Change path for isort and black * Update run_black_and_isort.yml * Change path for isort and black * Remove unwanted os
1 parent be05166 commit 00f1181

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Run checks using black and isort to maintain code structure
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
14+
os: [ ubuntu-latest ]
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up Python version ${{ matrix.python-version }}
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
pip install .
24+
pip install black isort
25+
- name: Run black and isort
26+
run: |
27+
python -m black easyPythonpi/*
28+
python -m isort easyPythonpi/*
29+

0 commit comments

Comments
 (0)