Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
7a01d61a
M
milvus
项目概览
milvus
/
milvus
10 个月 前同步成功
通知
260
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
7a01d61a
编写于
11月 22, 2021
作者:
J
Jenny Li
提交者:
GitHub
11月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[skip ci] Add /rerun-unit support (#12189)
Signed-off-by:
N
Jenny Li
<
jing.li@zilliz.com
>
上级
8c107ab1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
51 addition
and
1 deletion
+51
-1
.github/workflows/main.yaml
.github/workflows/main.yaml
+51
-1
未找到文件。
.github/workflows/main.yaml
浏览文件 @
7a01d61a
...
...
@@ -31,10 +31,15 @@ on:
-
go.mod
-
'
!**.md'
-
'
!build/ci/jenkins/**'
# Add Issue Comment for rerun
issue_comment
:
types
:
[
created
,
edited
]
jobs
:
ubuntu
:
name
:
Build and test AMD64 Ubuntu ${{ matrix.ubuntu }}
# Add /rerun-unit
if
:
"
(github.event_name
==
'push'
||
(github.event_name
==
'issue_comment'
&&
startsWith(github.event.comment.body,
'/rerun-unit')))"
runs-on
:
ubuntu-latest
timeout-minutes
:
90
strategy
:
...
...
@@ -44,31 +49,76 @@ jobs:
env
:
UBUNTU
:
${{ matrix.ubuntu }}
steps
:
-
name
:
Is Organization Member
shell
:
bash
if
:
"
github.event_name
==
'issue_comment'"
id
:
is_organization_member
run
:
|
response_code=$(curl -sIL -w %{http_code} -H "Authorization: token ${{ secrets.RERUN_BOT_TOKEN }}" -H "Accept: application/vnd.github.v3+json" \
-o /dev/null https://api.github.com/orgs/${GITHUB_REPOSITORY_OWNER}/members/${{ github.event.sender.login }})
echo " response code is ${response_code} "
if [[ ${response_code} == '204' ]];then
echo "::set-output name=is-member::true"
elif [[ ${response_code} == '404' ]]; then
echo "::set-output name=is-member::false"
else
echo "Please check if the repository secret RERUN_BOT_TOKEN still exists and have the permission to read organization membership."
exit 1
fi
-
name
:
Get Job URL
if
:
"
github.event_name
==
'issue_comment'
&&
steps.is_organization_member.outputs.is-member
==
'true'"
id
:
get_job_url
shell
:
bash
run
:
|
echo "::set-output name=job-url::'$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID'"
-
name
:
Create Comment for Org Member
if
:
"
github.event_name
==
'issue_comment'
&&
steps.is_organization_member.outputs.is-member
==
'true'"
uses
:
actions-cool/issues-helper@v2.5.0
with
:
actions
:
'
create-comment'
token
:
${{ secrets.GITHUB_TOKEN }}
issue-number
:
${{ github.event.issue.number }}
body
:
|
Hello ${{ github.event.sender.login }}. Workflow is successfully triggered, get more information from ${{ steps.get_job_url.outputs.job-url }}.
-
name
:
Create Comment for Non-Org Member
if
:
"
github.event_name
==
'issue_comment'
&&
steps.is_organization_member.outputs.is-member
==
'false'"
uses
:
actions-cool/issues-helper@v2.5.0
with
:
actions
:
'
create-comment'
token
:
${{ secrets.GITHUB_TOKEN }}
issue-number
:
${{ github.event.issue.number }}
body
:
|
Hello ${{ github.event.sender.login }}, you are not in the organization, so you do not have the permission to rerun the workflow, please contact `@milvus-io/milvus-maintainers` for help.
-
name
:
Checkout
if
:
"
github.event_name
!=
'issue_comment'
||
steps.is_organization_member.outputs.is-member
==
'true'"
uses
:
actions/checkout@v2
-
name
:
Cache CCache Volumes
if
:
"
github.event_name
!=
'issue_comment'
||
steps.is_organization_member.outputs.is-member
==
'true'"
uses
:
actions/cache@v1
with
:
path
:
.docker/amd64-ubuntu${{ matrix.ubuntu }}-ccache
key
:
ubuntu${{ matrix.ubuntu }}-ccache-${{ hashFiles('internal/core/**') }}
restore-keys
:
ubuntu${{ matrix.ubuntu }}-ccache-
-
name
:
Cache Go Mod Volumes
if
:
"
github.event_name
!=
'issue_comment'
||
steps.is_organization_member.outputs.is-member
==
'true'"
uses
:
actions/cache@v1
with
:
path
:
.docker/amd64-ubuntu${{ matrix.ubuntu }}-go-mod
key
:
ubuntu${{ matrix.ubuntu }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys
:
ubuntu${{ matrix.ubuntu }}-go-mod-
-
name
:
Start Service
if
:
"
github.event_name
!=
'issue_comment'
||
steps.is_organization_member.outputs.is-member
==
'true'"
shell
:
bash
run
:
|
docker-compose up -d pulsar etcd minio
-
name
:
Build and UnitTest
if
:
"
github.event_name
!=
'issue_comment'
||
steps.is_organization_member.outputs.is-member
==
'true'"
env
:
CHECK_BUILDER
:
"
1"
run
:
|
./build/builder.sh /bin/bash -c "make check-proto-product && make unittest"
-
name
:
Upload coverage to Codecov
if
:
github.repository == 'milvus-io/milvus'
if
:
"
github.repository
==
'milvus-io/milvus'
&&
(github.event_name
!=
'issue_comment'
||
steps.is_organization_member.outputs.is-member
==
'true')"
uses
:
codecov/codecov-action@v2
with
:
token
:
${{ secrets.CODECOV_TOKEN }}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录