Skip to content

Commit

Permalink
[ISSUE-3227] Optimize git action (#3228)
Browse files Browse the repository at this point in the history
* optimize git action
  • Loading branch information
casionone authored Sep 4, 2022
1 parent f8ebe3d commit 3261329
Show file tree
Hide file tree
Showing 9 changed files with 172 additions and 43 deletions.
53 changes: 53 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#
# 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.
#
# Test using:
# curl --data-binary @.github/codecov.yml https://codecov.io/validate
#
# https://docs.codecov.io/docs/codecovyml-reference
codecov:
require_ci_to_pass: no

coverage:
precision: 2
round: down
range: "20...100"
# Add status message to PRs.
status:
project:
default:
#todo adjust later
target: 15% #overall project/ repo coverage

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

github_checks:
annotations: false

ignore:
- "**/entity/*"
- "**/exception/*"

# See https://docs.codecov.com/docs/flags for options.
flag_management:
default_rules: # the rules that will be followed for any flag added, generally
carryforward: true # recommended for multi-lang mono-repos.
23 changes: 14 additions & 9 deletions .github/workflows/auto-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,25 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
:blush: Welcome to the Apache Linkis (incubating) community!!
## :blush: Welcome to the Apache Linkis (incubating) community!!
We are glad that you are contributing by opening this issue.
Please make sure to include all the relevant context.
We will be here shortly.
If you are interested in contributing to our website project, please let us know!
You can check out our contributing guide on
You can check out our contributing guide on
:point_right: [How to Participate in Project Contribution](https://linkis.apache.org/community/how-to-contribute).
WeChat Group:
![image](https://linkis.apache.org/Images/wedatasphere_contact_01.png)
Mailing Lists:
### Community
|WeChat Assistant|WeChat Public Account|
|-|-|
|<img src="https://linkis.apache.org/Images/wedatasphere_contact_01.png" width="128"/>|<img src="https://linkis.apache.org/Images/gzh_01.png" width="128"/>|
### Mailing Lists
|name|description|Subscribe|Unsubscribe|archive|
|:-----|:--------|:------|:-------|:-----|
| [[email protected]](mailto:[email protected]) | community activity information | [subscribe](mailto:[email protected]) | [unsubscribe](mailto:[email protected]) | [archive](http://mail-archives.apache.org/mod_mbox/linkis-dev) |
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,17 @@
# limitations under the License.
#

name: Build
name: Build Backend

on:
push:
pull_request:
on: [push, pull_request]

env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120

jobs:
build:

build-backend:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.17.3]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -42,14 +34,7 @@ jobs:
with:
distribution: 'adopt'
java-version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Code format check
run: |
./mvnw -N install
./mvnw spotless:check

- name: Build backend by maven
run: |
./mvnw -N install
Expand All @@ -58,8 +43,3 @@ jobs:
uses: codecov/[email protected]
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
- name: Build frontend by node.js
run: |
cd linkis-web
npm install
npm run build
53 changes: 53 additions & 0 deletions .github/workflows/build-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#
# 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: Build Frontend

on: [push, pull_request]


jobs:
build-frontend:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
with:
submodules: true

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set Up NodeJS ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node-version }}

- name: Build frontend by node.js
run: |
cd linkis-web
npm install
npm run build
36 changes: 36 additions & 0 deletions .github/workflows/check-code-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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: Code Format Check

on: [push, pull_request]

jobs:
spotless-check:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Code format check
run: |
./mvnw -N install
./mvnw spotless:check
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
# specific language governing permissions and limitations
# under the License.

name: License check
name: License Check

on: [push, pull_request]

jobs:
build:
apache-rat-check:
runs-on: ubuntu-latest
steps:
- name: Checkout source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
# specific language governing permissions and limitations
# under the License.

name: third-party dependencies check
name: Third-party Dependencies Check

on: [push, pull_request]

env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120

jobs:
build:
third-party-dependencies-check-:
runs-on: ubuntu-latest
steps:
- name: Checkout source
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/dead-link-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
on:
pull_request




name: Dead Link Check

on: [push, pull_request]

jobs:
CheckDeadLinks:
dead-links-check:
runs-on: ubuntu-latest
timeout-minutes: 30
if: (github.repository == 'apache/incubator-linkis')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

name: publish-docker
name: Publish Docker
on:
push:
branches:
Expand Down

0 comments on commit 3261329

Please sign in to comment.