ktmud commented on a change in pull request #9517: [Build] Add Github workflows
URL: 
https://github.com/apache/incubator-superset/pull/9517#discussion_r409889654
 
 

 ##########
 File path: .github/workflows/superset-python.yml
 ##########
 @@ -0,0 +1,174 @@
+name: Python
+
+on:
+  # only build on direct push to `master` branch
+  push:
+    branches: [ master ]
+    paths:
+    - ./**/*.py
+    - superset/**
+    - tests/**
+    - requirements*.txt
+  # but also build on pull requests to any branch
+  # (the so-called feature branch)
+  pull_request:
+    paths:
+    - ./**/*.py
+    - superset/**
+    - tests/**
+    - setup.py
+    - requirements*.txt
+
+jobs:
+  lint:
+    runs-on: ubuntu-18.04
+    strategy:
+      matrix:
+        python-version: [3.6]
+    env:
+      PYTHON_LINT_TARGET: setup.py superset tests
+      CI: github-actions
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v2
+    - name: Setup Python
+      uses: actions/setup-python@v1
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install dependencies
+      uses: apache-superset/cached-dependencies@ddf7d7f
+    - name: black
+      run: black --check $(echo $PYTHON_LINT_TARGET)
 
 Review comment:
   Most of these commands are one liners so I wouldn't worry too much, but feel 
free to refactor if you could find a way to reuse `tox` commands without 
degrading the building speed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to