Skip to content

Commit

Permalink
chore(wordflow): add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
baifuyu authored Dec 11, 2023
2 parents d26b9ab + 0d46d76 commit 5667a8b
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2023 Ant Group CO., Ltd.
#
# Licensed 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.

@baifuyu

/cloudext fuyu.bfy@antgroup.com
/python qy266141@antgroup.com matthew.hyx@antgroup.com fuyu.bfy@antgroup.com
/reasoner donghai.ydh@antgroup.com fuyu.bfy@antgroup.com chengqiang.cq@antgroup.com peilong.zpl@antgroup.com wangshaofei.wsf@antgroup.com chushi.zj@antgroup.com zhizhen.lzz@antgroup.com

22 changes: 22 additions & 0 deletions .github/workflows/cloud_code_scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Alipay Cloud Devops Codescan
on:
pull_request_target:
jobs:
stc:
runs-on: ubuntu-latest
steps:
- name: codeScan
uses: layotto/alipay-cloud-devops-codescan@main
with:
parent_uid: ${{ secrets.ALI_PID }}
private_key: ${{ secrets.ALI_PK }}
scan_type: stc
sca:
runs-on: ubuntu-latest
steps:
- name: codeScan
uses: layotto/alipay-cloud-devops-codescan@main
with:
parent_uid: ${{ secrets.ALI_PID }}
private_key: ${{ secrets.ALI_PK }}
scan_type: sca
25 changes: 25 additions & 0 deletions .github/workflows/license-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: License Checker

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check:
name: "License Validation"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Check License Header
uses: apache/skywalking-eyes@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
log: info
- name: Check Dependencies' License
uses: apache/skywalking-eyes/dependency@main
36 changes: 36 additions & 0 deletions .github/workflows/openspg-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: CI

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
cache: maven
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip' # caching pip dependencies
- run: pip install black==22.3.0
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/pr-title-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
# https://www.conventionalcommits.org/en/v1.0.0/#summary
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
requireScope: true
subjectPattern: ^(?![A-Z]).+$
# If `subjectPattern` is configured, you can use this property to override
# the default error message that is shown when the pattern doesn't match.
# The variables `subject` and `title` can be used within the message.
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.

0 comments on commit 5667a8b

Please sign in to comment.