Skip to content

Commit

Permalink
Merge branch 'master' into sai/10381_query_balance_by_ibc_denom
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored Nov 11, 2021
2 parents ae93ce9 + 84860a8 commit d60f2e9
Show file tree
Hide file tree
Showing 239 changed files with 11,751 additions and 925 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "CodeQL"

on:
pull_request:
push:
branches: [ master ]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v2.3.5

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: 'go'
queries: crypto-com/cosmos-sdk-codeql@main,security-and-quality
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
2 changes: 1 addition & 1 deletion .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3.4.2
- uses: amannn/action-semantic-pull-request@v3.4.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 7 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ jobs:
steps:
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.16
go-version: 1.17
- uses: technote-space/get-diff-action@v5
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: run go linters
run: make lint-go
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
args: --out-format=tab
skip-go-installation: true
if: env.GIT_DIFF
31 changes: 20 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,39 +38,44 @@ jobs:
with:
PATTERNS: |
**/**.go
go.mod
go.sum
**/go.mod
**/go.sum
- name: Build
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build

test-cosmovisor:
- name: Build cosmovisor
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make cosmovisor

test-submodules:
runs-on: ubuntu-latest
container: tendermintdev/docker-tm-db-testing
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v5
id: git_diff
with:
PREFIX_FILTER: |
cosmovisor
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Run cosmovisor tests
run: cd cosmovisor; make
- name: Run submodule tests and create test coverage profile.
# GIT_DIFF is passed to the scripts
run: bash scripts/module-tests.sh
if: env.GIT_DIFF
- uses: actions/upload-artifact@v2
with:
name: "${{ github.sha }}-go-submodules-coverage"
path: ./coverage-go-submod-profile.out

split-test-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create a file with all the pkgs
run: go list ./... > pkgs.txt
- name: Create a file with all core Cosmos SDK pkgs
run: go list ./... > pkgs.txt
- name: Split pkgs into 4 files
run: split -d -n l/4 pkgs.txt pkgs.txt.part.
# cache multiple
Expand Down Expand Up @@ -149,6 +154,10 @@ jobs:
with:
name: "${{ github.sha }}-03-coverage"
if: env.GIT_DIFF
- uses: actions/download-artifact@v2
with:
name: "${{ github.sha }}-go-submodules-coverage"
if: env.GIT_DIFF
- run: |
cat ./*profile.out | grep -v "mode: atomic" >> coverage.txt
if: env.GIT_DIFF
Expand Down
Loading

0 comments on commit d60f2e9

Please sign in to comment.