juliaturc commited on
Commit
4465c09
·
1 Parent(s): 02a7f76

GitHub action to run formatting (#53)

Browse files
Files changed (1) hide show
  1. .github/workflows/ci.yml +35 -0
.github/workflows/ci.yml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Code Formatting Check
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ format-check:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v2
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v2
21
+ with:
22
+ python-version: '3.x'
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install black isort
28
+
29
+ - name: Run isort
30
+ run: |
31
+ isort .
32
+
33
+ - name: Run black
34
+ run: |
35
+ black --line-length=120 .