From 7e325ffc61bd933ec2b9a9cc9c5a39322388e080 Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Thu, 25 Apr 2024 17:37:05 +0200 Subject: [PATCH] Split check workflow in two jobs --- .github/workflows/check.yml | 54 +++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c961a93..81e2891 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -3,16 +3,11 @@ on: pull_request: jobs: - run: - name: Run + cppcheck: + name: Cppcheck runs-on: ubuntu-22.04 - defaults: - run: - working-directory: src/pg_stat_monitor - steps: - - name: Checkout sources uses: actions/checkout@v4 with: @@ -21,31 +16,32 @@ jobs: - name: Checkout cppcheck sources uses: actions/checkout@v4 with: - repository: 'danmar/cppcheck' - ref: '2.13.4' + repository: "danmar/cppcheck" + ref: "2.13.4" path: src/cppcheck - # - name: Build and install cppcheck - # working-directory: src/cppcheck - # run: | - # mkdir build - # cd build - # cmake .. - # cmake --build . - # sudo cmake --install . + - name: Build and install cppcheck + working-directory: src/cppcheck + run: | + mkdir build + cd build + cmake .. + cmake --build . + sudo cmake --install . - # - name: Execute linter check with cppcheck - # run: | - # set -x - # cppcheck --enable=all --inline-suppr --template='{file}:{line},{severity},{id},{message}' --error-exitcode=1 --suppress=missingIncludeSystem --suppress=missingInclude --suppress=unmatchedSuppression:pg_stat_monitor.c --check-config . + - name: Execute linter check with cppcheck + working-directory: src/pg_stat_monitor + run: | + set -x + cppcheck --enable=all --inline-suppr --template='{file}:{line},{severity},{id},{message}' --error-exitcode=1 --suppress=missingIncludeSystem --suppress=missingInclude --suppress=unmatchedSuppression:pg_stat_monitor.c --check-config . + + licens: + name: License + runs-on: ubuntu-22.04 + + steps: + - name: Checkout sources + uses: actions/checkout@v4 - name: Check license headers uses: apache/skywalking-eyes/header@v0.6.0 - working-directory: src/pg_stat_monitor - - - name: Run debug commands on failure - if: ${{ failure() }} - run: | - env - pwd - git status