mirror of https://github.com/milvus-io/milvus.git
Add Code check workflow
Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>pull/4973/head^2
parent
a13638b172
commit
3ead70ac6e
|
@ -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"
|
|
@ -42,12 +42,6 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
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
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
|
@ -62,4 +56,4 @@ jobs:
|
|||
env:
|
||||
CHECK_BUILDER: "1"
|
||||
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!"
|
||||
|
||||
# clang-tidy check
|
||||
make check-clang-tidy || true
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR! clang-tidy check failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "clang-tidy check passed!"
|
||||
# make check-clang-tidy || true
|
||||
# if [ $? -ne 0 ]; then
|
||||
# echo "ERROR! clang-tidy check failed"
|
||||
# exit 1
|
||||
# fi
|
||||
# echo "clang-tidy check passed!"
|
||||
else
|
||||
# compile and build
|
||||
make -j ${jobs} install || exit 1
|
||||
|
|
Loading…
Reference in New Issue