From 8c9a0be81c6f90825f393c7b956cc9cde159eea0 Mon Sep 17 00:00:00 2001 From: shyingsheng01 <147713494+shyingsheng01@users.noreply.github.com> Date: Tue, 10 Feb 2026 14:11:55 +0800 Subject: [PATCH] add static check --- .github/workflows/main.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 831717a..838cc66 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,6 +8,7 @@ on: branches: [ main ] jobs: + build-and-test: runs-on: S60 # 或者指定标签 @@ -16,7 +17,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - + with: + fetch-depth: 0 # 需要完整的git历史来比较变更 + + - name: Run static code analysis + run: | + sudo docker run --rm -v $(pwd):/app -v $(pwd):/sast -u $(id -u):$(id -g) -w /app registry-egc.enflame-tech.com/enflame/ci_sast:v1.0-os bash -c 'cd /app && python3 /sast/run.py --all_ci_check' + - name: Build run: | set -x