Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): test 52 upgrade #889

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
17 changes: 17 additions & 0 deletions .github/52-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "test",
"pattern": [
{
"regexp": "\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\"",
"file": 5,
"line": 6,
"column": 7,
"severity": 3,
"message": 2
}
]
}
]
}
70 changes: 70 additions & 0 deletions .github/workflows/52.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CodeQL Lint (Go, No Security Alerts)

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read

jobs:
codeql-lint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
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: |
go build ./connectd/...

- 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=csv\
--output=codeql-results.csv \
codeql-db/go \
skip-mev/cosmos-52-ql

${{ 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: 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.csv
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: ./tests/simapp/codeql-results.sarif
category: migration-lint
Loading