You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2023/05/29 03:33:36 UTC

[shardingsphere] branch master updated: Add dealink check (#25922)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new cd08bbc1133 Add dealink check (#25922)
cd08bbc1133 is described below

commit cd08bbc113383d8914990be6e8c94d9b70025e1b
Author: 孙念君 Nianjun Sun <su...@apache.org>
AuthorDate: Mon May 29 11:33:27 2023 +0800

    Add dealink check (#25922)
---
 .github/workflows/nightly-check.yml             | 21 +++++++++++++----
 .github/workflows/resources/linkcheck/.dlc.json | 31 +++++++++++++++++++++++++
 MATURITY.md                                     | 14 +++++------
 3 files changed, 55 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/nightly-check.yml b/.github/workflows/nightly-check.yml
index fd652bda661..f1936eede93 100644
--- a/.github/workflows/nightly-check.yml
+++ b/.github/workflows/nightly-check.yml
@@ -28,7 +28,7 @@ env:
 
 jobs:
   check-spotbugs:
-    if: github.repository == 'apache/shardingsphere'
+    if: (github.event_name == 'schedule' && github.repository == 'apache/shardingsphere')
     name: Check - SpotBugs
     runs-on: ubuntu-latest
     timeout-minutes: 60
@@ -44,7 +44,7 @@ jobs:
         run: ./mvnw clean install spotbugs:check -T1C
   
   check-and-report-sonarcloud:
-    if: github.repository == 'apache/shardingsphere'
+    if: (github.repository == 'apache/shardingsphere')
     name: Check - SonarCloud
     runs-on: ubuntu-latest
     timeout-minutes: 40
@@ -73,7 +73,7 @@ jobs:
         run: ./mvnw -B clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_shardingsphere -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipTests
   
   jacoco-coverage-report-sonarcloud:
-    if: github.repository == 'apache/shardingsphere'
+    if: (github.event_name == 'schedule' && github.repository == 'apache/shardingsphere')
     name: Coverage - SonarCloud
     runs-on: ubuntu-latest
     timeout-minutes: 40
@@ -105,7 +105,7 @@ jobs:
         run: ./mvnw -B sonar:sonar -Dsonar.login=${SONAR_TOKEN} -Dsonar.projectKey=apache_shardingsphere -Dsonar.coverage.jacoco.xmlReportPaths=report/target/site/jacoco-aggregate/jacoco.xml -Dmaven.javadoc.skip=true -Drat.skip=true
   
   checkstyle-report-sonarcloud:
-    if: github.repository == 'apache/shardingsphere'
+    if: (github.event_name == 'schedule' && github.repository == 'apache/shardingsphere')
     name: Checkstyle - SonarCloud
     runs-on: ubuntu-latest
     timeout-minutes: 40
@@ -134,3 +134,16 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
         run: ./mvnw -B sonar:sonar -Dsonar.projectKey=apache_shardingsphere -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml
+  
+  CheckDeadLinks:
+    if: (github.event_name == 'schedule' && github.repository == 'apache/shardingsphere')
+    runs-on: ubuntu-latest
+    timeout-minutes: 30
+    steps:
+      - uses: actions/checkout@v3
+      - run: sudo npm install -g markdown-link-check@3.10.0
+      - name: Check dead link
+        run: |
+          for file in $(find . -name "*.md"); do
+            markdown-link-check -c .github/workflows/resources/linkcheck/.dlc.json -q "$file"
+          done
diff --git a/.github/workflows/resources/linkcheck/.dlc.json b/.github/workflows/resources/linkcheck/.dlc.json
new file mode 100644
index 00000000000..7005db9cda4
--- /dev/null
+++ b/.github/workflows/resources/linkcheck/.dlc.json
@@ -0,0 +1,31 @@
+{
+  "ignorePatterns": [
+    {
+      "pattern": "^http://localhost"
+    },
+    {
+      "pattern": "^https://dist.apache.org/repos/dist/release/incubator/shardingsphere/*"
+    },
+    {
+      "pattern": "^https://github.com/apache/incubator-shardingsphere/*"
+    },
+    {
+      "pattern": "^/en/*"
+    },
+    {
+      "pattern": "^/cn/*"
+    },
+    {
+      "pattern": "^https://twitter.com*"
+    }
+  ],
+  "timeout": "10s",
+  "retryOn429": true,
+  "retryCount": 10,
+  "fallbackRetryDelay": "1000s",
+  "aliveStatusCodes": [
+    200,
+    401,
+    403
+  ]
+}
diff --git a/MATURITY.md b/MATURITY.md
index 38902bff5cf..3e9c77fb46c 100644
--- a/MATURITY.md
+++ b/MATURITY.md
@@ -26,13 +26,13 @@ Mentors and community members are encouraged to contribute to this page and comm
 
 **Licenses and Copyright**
 
-| **ID**   | **Description**                                                                                                                                                                                                                                                                 | **Status** |
-| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
-| **LC10** | The code is released under the Apache License, version 2.0.                                                                                                                                                                                                                     | **YES.** The [LICENSE file](https://github.com/apache/incubator-shardingsphere/blob/dev/LICENSE) is in GitHub repository. |
-| **LC20** | Libraries that are mandatory dependencies of the project's code do not create more restrictions than the Apache License does.                                                                                                                                                   | **YES.** The [list of dependencies](https://github.com/apache/shardingsphere/tree/master/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/release-docs/licenses) for binary release and [...]
-| **LC30** | The libraries mentioned in LC20 are available as Open Source software.                                                                                                                                                                                                          | **YES.** See LC20's dependencies list. |
-| **LC40** | Committers are bound by an Individual Contributor Agreement (the "Apache iCLA") that defines which code they are allowed to commit and how they need to identify code that is not their own.                                                                                    | **YES.** All committers have iCLAs on file before they have an apache account. |
-| **LC50** | The copyright ownership of everything that the project produces is clearly defined and documented.                                                                                                                                                                              | **YES.** All files in the source code have appropriate headers and checked by `Apache rat plugin` when build. |
+| **ID**   | **Description**                                                                                                                                                                                                                                                                 | **Status**                                                                                                                                                                                                    [...]
+| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [...]
+| **LC10** | The code is released under the Apache License, version 2.0.                                                                                                                                                                                                                     | **YES.** The [LICENSE file](https://github.com/apache/incubator-shardingsphere/blob/dev/LICENSE) is in GitHub repository.                                                                                     [...]
+| **LC20** | Libraries that are mandatory dependencies of the project's code do not create more restrictions than the Apache License does.                                                                                                                                                   | **YES.** The [list of dependencies](https://github.com/apache/shardingsphere/tree/master/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/release-docs/licenses) for binary release has [...]
+| **LC30** | The libraries mentioned in LC20 are available as Open Source software.                                                                                                                                                                                                          | **YES.** See LC20's dependencies list.                                                                                                                                                                        [...]
+| **LC40** | Committers are bound by an Individual Contributor Agreement (the "Apache iCLA") that defines which code they are allowed to commit and how they need to identify code that is not their own.                                                                                    | **YES.** All committers have iCLAs on file before they have an apache account.                                                                                                                                [...]
+| **LC50** | The copyright ownership of everything that the project produces is clearly defined and documented.                                                                                                                                                                              | **YES.** All files in the source code have appropriate headers and checked by `Apache rat plugin` when build.                                                                                                 [...]
 
 **Releases**