From 5a3e6404b7b6d11f4c7447bcb9f4598a1fc01152 Mon Sep 17 00:00:00 2001 From: Zygimantas Date: Thu, 16 Jan 2025 12:54:42 +0100 Subject: [PATCH] feat(ci): test 52 upgrade --- .github/52-problem-matcher.json | 17 +++++++++++++++++ .github/workflows/52.yml | 24 +++++------------------- 2 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 .github/52-problem-matcher.json diff --git a/.github/52-problem-matcher.json b/.github/52-problem-matcher.json new file mode 100644 index 000000000..14268a72c --- /dev/null +++ b/.github/52-problem-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "cosmos-52-ql", + "pattern": [ + { + "regexp": ""\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\", + "file": 5, + "line": 6, + "column": 7, + "severity": 3, + "message": 2, + } + ] + } + ] +} diff --git a/.github/workflows/52.yml b/.github/workflows/52.yml index 47a26c534..ee43c4cd1 100644 --- a/.github/workflows/52.yml +++ b/.github/workflows/52.yml @@ -42,31 +42,17 @@ jobs: codeql-db/go ${{ steps.codeql-init.outputs.codeql-path }} database analyze \ - --format=sarif-latest \ - --output=codeql-results.sarif \ + --format=csv\ + --output=codeql-results.csv \ codeql-db/go \ skip-mev/cosmos-52-ql - - name: Install jq uses: dcarbone/install-jq-action@v3.0.1 + - name: Add problem matcher + run: echo "::add-matcher::.github/52-problem-matcher.json" - name: Annotate code with findings working-directory: ./tests/simapp run: | set -eoux pipefail - cat codeql-results.sarif - - issues=$(jq -r ' - .runs[].results[] | - . as $r | - ($r.locations[0].physicalLocation.artifactLocation.uri | select(. != null)) as $file | - ($r.locations[0].physicalLocation.region.startLine | select(. != null)) as $line | - ($r.message.text | gsub("[\r\n]"; " ")) as $msg | - [$file, $line, $msg] | @tsv - ' codeql-results.sarif ) - - while IFS=$'\t' read -r file line msg; do - file="${file#file://}" - echo "::warning file=$file,line=$line::$msg" - done <<< "$issues" - + cat codeql-results.csv