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

zhongjiajie pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/dolphinscheduler-sdk-python.git


The following commit(s) were added to refs/heads/main by this push:
     new 871e8f3  [chore] Improve CI and fix deadlink (#11)
871e8f3 is described below

commit 871e8f3d09acbddf9177eac69984aa8042daa1f5
Author: Jay Chung <[email protected]>
AuthorDate: Fri Nov 11 09:37:02 2022 +0800

    [chore] Improve CI and fix deadlink (#11)
    
    * Add coverage for PR and badge. fix: 
https://github.com/apache/dolphinscheduler/issues/8256
    * Add schedule job to check upstream apache/dolphinscheduler
      code work or not
    * Fix deadlink
---
 .github/codecov.yml       | 40 ++++++++++++++++++++++++++++++++++++++++
 .github/workflows/ci.yaml | 14 ++++++++++++++
 .gitignore                |  1 +
 README.md                 |  4 ++--
 tox.ini                   |  2 +-
 5 files changed, 58 insertions(+), 3 deletions(-)

diff --git a/.github/codecov.yml b/.github/codecov.yml
new file mode 100644
index 0000000..839717f
--- /dev/null
+++ b/.github/codecov.yml
@@ -0,0 +1,40 @@
+# 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.
+
+# Configuration file for codecov.io, 
https://docs.codecov.io/docs/codecovyml-reference
+
+codecov:
+  branch: main
+  bot: "codecov-io"
+  ci:
+    - "github.com"
+  max_report_age: 24
+  disable_default_path_fixes: no
+  require_ci_to_pass: yes
+  notify:
+    after_n_builds: 1
+    wait_for_ci: yes
+
+coverage:
+  precision: 2
+  round: down
+  range: "70...100"
+  status:
+    project:
+      default:
+        target: auto
+        threshold: 0%
\ No newline at end of file
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index f6b0beb..96e0db7 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -20,6 +20,11 @@ on:
     branches:
       - main
   pull_request:
+  schedule:
+    # Schedule daily builds at 00:00 UTC, because pydolphinscheduler rely on 
dolphinscheduler's API server, and
+    # pydolphinscheduler can not aware of the changes of dolphinscheduler's 
API server code, so we need to add
+    # schedule job to need passive inspection the latest code in 
apache/dolphinscheduler still work on.
+    - cron: '0 0 * * *'
 
 concurrency:
   group: ci-${{ github.event.pull_request.number || github.ref }}
@@ -28,6 +33,7 @@ concurrency:
 # We have to update setuptools wheel to package with package_data, LICENSE, 
NOTICE
 env:
   DEPENDENCES: pip setuptools wheel tox
+  CODECOV_TOKEN: 7b597b03-7c9f-4175-b3ac-e74034ea87a6
 
 jobs:
   license:
@@ -90,6 +96,14 @@ jobs:
       - name: Run All Tests
         run: |
           python -m tox -vv -e code-test
+      - uses: codecov/codecov-action@v3
+        with:
+          token: ${{ env.CODECOV_TOKEN }}
+          files: ./coverage.xml
+          flags: unittests
+          name: codecov-umbrella
+          fail_ci_if_error: true
+          verbose: true
   doc-build:
     timeout-minutes: 15
     needs: lint
diff --git a/.gitignore b/.gitignore
index 080eb58..907b2b1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,5 @@ build/
 
 # Test coverage
 .coverage
+coverage.xml
 htmlcov/
diff --git a/README.md b/README.md
index 2c4dec4..693c27e 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ under the License.
 [![PyPi 
License](https://img.shields.io/pypi/l/apache-dolphinscheduler.svg?style=flat-square)](https://pypi.org/project/apache-dolphinscheduler/)
 [![PyPi 
Status](https://img.shields.io/pypi/status/apache-dolphinscheduler.svg?style=flat-square)](https://pypi.org/project/apache-dolphinscheduler/)
 [![PyPi 
Downloads](https://img.shields.io/pypi/dm/apache-dolphinscheduler?style=flat-square)](https://pypi.org/project/apache-dolphinscheduler/)
-
+[![Coverage 
Status](https://img.shields.io/codecov/c/github/apache/dolphinscheduler-sdk-python/main.svg?style=flat-square)](https://codecov.io/github/apache/dolphinscheduler-sdk-python?branch=main)
 [![Code style: 
black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
 [![Imports: 
isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat-square&labelColor=ef8336)](https://pycqa.github.io/isort)
 
[![CI](https://github.com/apache/dolphinscheduler-sdk-python/actions/workflows/ci.yaml/badge.svg)](https://github.com/apache/dolphinscheduler-sdk-python/actions/workflows/ci.yaml)
@@ -87,4 +87,4 @@ If you are interested in how to release 
**PyDolphinScheduler**, you could go and
 
 ## What's more
 
-For more detail information, please go to see **PyDolphinScheduler** 
latest(unreleased) 
[document](https://dolphinscheduler.apache.org/python/dev/index.html)
+For more detail information, please go to see **PyDolphinScheduler** 
latest(unreleased) 
[document](https://dolphinscheduler.apache.org/python/main/index.html)
diff --git a/tox.ini b/tox.ini
index 4ce8043..1b5bb43 100644
--- a/tox.ini
+++ b/tox.ini
@@ -42,7 +42,7 @@ commands =
 extras = test
 # Run both tests and coverage
 commands =
-    python -m pytest --cov=pydolphinscheduler 
--cov-config={toxinidir}/.coveragerc tests/
+    python -m pytest --cov=pydolphinscheduler 
--cov-config={toxinidir}/.coveragerc --cov-report term --cov-report 
xml:coverage.xml tests/
 
 [testenv:doc-build]
 extras = doc

Reply via email to