Skip to content

Commit

Permalink
feat(ci): test 52 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Zygimantass committed Jan 16, 2025
1 parent 4bd96d1 commit 8a9f619
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/52.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,51 @@ jobs:
go-version: 1.22
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
id: codeql-init
with:
db-location: ./tests/simapp/codeql-db
token: ${{ secrets.GITHUB_TOKEN }}
languages: go
source-root: ./tests/simapp
build-mode: manual
packs: skip-mev/cosmos-52-ql

- name: Build (Make Install)
working-directory: ./tests/simapp
run: |
make install
go build ./connectd/...
- name: Analyze with CodeQL (no upload)
uses: github/codeql-action/analyze@v3
id: analyze
with:
upload: never
output: ../results
- name: Analyze
working-directory: ./tests/simapp
run: |
echo $PWD
ls $PWD
${{ steps.codeql-init.outputs.codeql-path }} database finalize \
codeql-db/go
${{ steps.codeql-init.outputs.codeql-path }} database analyze \
--format=sarif-latest \
--output=codeql-results.sarif \
codeql-db/go \
skip-mev/cosmos-52-ql
- name: Install jq
uses: dcarbone/[email protected]
- 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
' ${{ steps.analyze.outputs.sarif-output }}/go.sarif )
' codeql-results.sarif )
while IFS=$'\t' read -r file line msg; do
file="${file#file://}"
Expand Down

0 comments on commit 8a9f619

Please sign in to comment.