You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by sh...@apache.org on 2020/10/16 09:18:15 UTC

[kibble] branch master updated: Introduce github actions for CI (#47)

This is an automated email from the ASF dual-hosted git repository.

sharan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git


The following commit(s) were added to refs/heads/master by this push:
     new b371d80  Introduce github actions for CI (#47)
b371d80 is described below

commit b371d80a39d90fa56eeda9edbc46c7cf58268716
Author: Tomek Urbaszek <tu...@gmail.com>
AuthorDate: Fri Oct 16 11:18:07 2020 +0200

    Introduce github actions for CI (#47)
    
    * Introduce github actions for CI
    
    * fixup! Introduce github actions for CI
---
 .github/workflows/ci.yaml | 30 ++++++++++++++++++++++++++++++
 .pre-commit-config.yaml   |  2 ++
 CONTRIBUTING.md           | 28 +++++++++++++++++++++++++++-
 3 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 0000000..f7f27c0
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+---
+name: CI
+on:
+  - push
+  - pull_request
+
+jobs:
+  statics:
+    name: Static Checks
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-python@v1
+      - uses: pre-commit/action@v1.0.1
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 07fae56..3dd6d75 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -28,4 +28,6 @@ repos:
     hooks:
       - id: check-yaml
       - id: end-of-file-fixer
+        exclude: ^ui/vendors/.*$
       - id: trailing-whitespace
+        exclude: ^ui/vendors/.*$
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a28a44f..2c3351a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,6 @@
 # Contributing to Kibble #
 
-## Community 
+## Community
 
 The main development and design discussion happens on our mailing lists.
 We have a list specifically for development, and one for future user questions and feedback.
@@ -17,3 +17,29 @@ We also have:
 
 This project requires Python in higher version than 3.4.
 More information will come soon!
+
+## Code Quality
+
+Apache Kibble project is using [pre-commits](https://pre-commit.com) to ensure the quality of the code.
+We encourage you to use pre-commits, but it's not required in order to contribute. Every change is checked
+on CI and if it does not pass the tests it cannot be accepted. If you want to check locally then
+you should install Python3.6 or newer together and run:
+```bash
+pip install pre-commit
+# or
+brew install pre-commit
+```
+For more installation options visit the [pre-commits](https://pre-commit.com).
+
+To turn on pre-commit checks for commit operations in git, run:
+```bash
+pre-commit install
+```
+To run all checks on your staged files, run:
+```bash
+pre-commit run
+```
+To run all checks on all files, run:
+```bash
+pre-commit run --all-files
+```