Skip to content

Commit 942d0a3

Browse files
authored
Merge pull request #32 from creativecommons/gh-actions
add static analysis GitHub Action of python files
2 parents bfad674 + 27b3d85 commit 942d0a3

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Python Static Analysis
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
jobs:
10+
job:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
15+
# https://github.com/actions/setup-python
16+
- name: Install Python 3.10
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.10'
20+
21+
- name: Install Python dependencies
22+
run: |
23+
pip install --upgrade pip
24+
pip install black 'black[jupyter]' flake8 isort
25+
26+
# https://github.com/actions/checkout
27+
- name: Checkout repository
28+
uses: actions/checkout@v3
29+
30+
- name: Run isort
31+
run: isort --check .
32+
33+
- name: Run flake8
34+
run: flake8
35+
36+
- name: Run black
37+
run: black --check .

0 commit comments

Comments
 (0)