mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 17:48:29 +08:00
Add Code check workflow
Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
This commit is contained in:
parent
a13638b172
commit
3ead70ac6e
53
.github/workflows/code-checker.yaml
vendored
Normal file
53
.github/workflows/code-checker.yaml
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
name: Code Checker
|
||||||
|
# TODO: do not trigger action for some document file update
|
||||||
|
|
||||||
|
# This workflow is triggered on pushes or pull request to the repository.
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
# file paths to consider in the event. Optional; defaults to all.
|
||||||
|
paths:
|
||||||
|
- 'scripts/**'
|
||||||
|
- 'internal/**'
|
||||||
|
- 'cmd/**'
|
||||||
|
- 'build/**'
|
||||||
|
- '.github/workflows/code-checker.yaml'
|
||||||
|
- '.env'
|
||||||
|
- docker-compose.yml
|
||||||
|
- Makefile
|
||||||
|
- '!**.md'
|
||||||
|
pull_request:
|
||||||
|
# file paths to consider in the event. Optional; defaults to all.
|
||||||
|
paths:
|
||||||
|
- 'scripts/**'
|
||||||
|
- 'internal/**'
|
||||||
|
- 'cmd/**'
|
||||||
|
- 'build/**'
|
||||||
|
- '.github/workflows/code-checker.yaml'
|
||||||
|
- '.env'
|
||||||
|
- docker-compose.yml
|
||||||
|
- Makefile
|
||||||
|
- '!**.md'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ubuntu:
|
||||||
|
name: AMD64 Ubuntu ${{ matrix.ubuntu }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 60
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
ubuntu: [18.04]
|
||||||
|
env:
|
||||||
|
UBUNTU: ${{ matrix.ubuntu }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Dockerfile Lint
|
||||||
|
uses: reviewdog/action-hadolint@v1
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
reporter: github-pr-check # Default is github-pr-check
|
||||||
|
hadolint_ignore: DL3008
|
||||||
|
- name: Code Check
|
||||||
|
run: |
|
||||||
|
./build/builder.sh /bin/bash -c "make check-proto-product && make verifiers"
|
||||||
8
.github/workflows/main.yaml
vendored
8
.github/workflows/main.yaml
vendored
@ -42,12 +42,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Check Dockerfile
|
|
||||||
uses: reviewdog/action-hadolint@v1
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
reporter: github-pr-check # Default is github-pr-check
|
|
||||||
hadolint_ignore: DL3008
|
|
||||||
- name: Cache Docker Volumes
|
- name: Cache Docker Volumes
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
@ -62,4 +56,4 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CHECK_BUILDER: "1"
|
CHECK_BUILDER: "1"
|
||||||
run: |
|
run: |
|
||||||
./build/builder.sh
|
./build/builder.sh /bin/bash -c "make check-proto-product && make unittest"
|
||||||
|
|||||||
@ -154,12 +154,12 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
|
|||||||
echo "clang-format check passed!"
|
echo "clang-format check passed!"
|
||||||
|
|
||||||
# clang-tidy check
|
# clang-tidy check
|
||||||
make check-clang-tidy || true
|
# make check-clang-tidy || true
|
||||||
if [ $? -ne 0 ]; then
|
# if [ $? -ne 0 ]; then
|
||||||
echo "ERROR! clang-tidy check failed"
|
# echo "ERROR! clang-tidy check failed"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
echo "clang-tidy check passed!"
|
# echo "clang-tidy check passed!"
|
||||||
else
|
else
|
||||||
# compile and build
|
# compile and build
|
||||||
make -j ${jobs} install || exit 1
|
make -j ${jobs} install || exit 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user