Delete .github directory

This isn't an actively developed fork so drop all the github automation.
This commit is contained in:
Chirantan Ekbote 2022-11-01 17:52:34 +09:00 committed by Conor Patrick
parent a7ff4d21e5
commit 9f2b91495b
45 changed files with 0 additions and 2235 deletions

7
.github/CODEOWNERS vendored
View File

@ -1,7 +0,0 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/
# NOTE: Order is important; the last matching pattern takes the
# most precedence.
# Primary repo maintainers
* @cosmos/sdk-core-dev

View File

@ -1,29 +0,0 @@
---
name: Bug Report
about: Create a report to help us squash bugs!
---
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
v Before smashing the submit button please review the template.
v Please also ensure that this is not a duplicate issue :)
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->
<!--
IMPORTANT: Prior to opening a bug report, check if it affects one of the core modules
and if its elegible for a bug bounty on `SECURITY.md`. Bugs that are not submitted
through the appropriate channels won't receive any bounty.
-->
## Summary of Bug
<!-- Concisely describe the issue -->
## Version
<!-- git commit hash or release version -->
## Steps to Reproduce
<!-- What commands in order should someone run to reproduce your problem? -->

View File

@ -1,30 +0,0 @@
---
name: Epic
about: Create an epic/user
---
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
v Before smashing the submit button please review the template.
v Word of caution: poorly thought-out proposals may be rejected
v without deliberation
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->
## Summary
<!-- Short, concise description of the proposed feature/changes to the repository
What are the user needs?
How could this solution fix the user facing problem? -->
## Problem Definition
<!-- Why do we need this feature?
What problems may be addressed by introducing this feature?
What benefits does the SDK stand to gain by including this feature?
Are there any disadvantages of including this feature? -->
## Work Breakdown
<!-- Break the work into many bullet points that will later be turned into issues that can be assigned to developers to work on
This work may been to be broken up into phases of work in order to better organize when and how things get done. -->

View File

@ -1,27 +0,0 @@
---
name: Feature Request
about: Create a proposal to request a feature
---
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
v Before smashing the submit button please review the template.
v Word of caution: poorly thought-out proposals may be rejected
v without deliberation
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->
## Summary
<!-- Short, concise description of the proposed feature -->
## Problem Definition
<!-- Why do we need this feature?
What problems may be addressed by introducing this feature?
What benefits does the SDK stand to gain by including this feature?
Are there any disadvantages of including this feature? -->
## Proposal
<!-- Detailed description of requirements of implementation -->

View File

@ -1,40 +0,0 @@
---
name: Module Readiness Checklist
about: Pre-flight checklist that modules must pass in order to be included in a release of the Cosmos SDK
labels: 'module-readiness-checklist'
---
## x/{MODULE_NAME} Module Readiness Checklist
This checklist is to be used for tracking the final internal audit of new Cosmos SDK modules prior to inclusion in a published release.
### Release Candidate Checklist
The following checklist should be gone through once the module has been fully implemented. This audit should be performed directly on `main`, or preferably on a `alpha` or `beta` release tag that includes the module.
The module **should not** be included in any Release Candidate tag until it has passed this checklist.
- [ ] API audit (at least 1 person) (@assignee)
- [ ] Are Msg and Query methods and types well-named and organized?
- [ ] Is everything well documented (inline godoc as well as the spec [README.md](https://github.com/cosmos/cosmos-sdk/blob/main/docs/spec/SPEC-SPEC.md) in module directory)
- [ ] State machine audit (at least 2 people) (@assignee1, @assignee2)
- [ ] Read through MsgServer code and verify correctness upon visual inspection
- [ ] Ensure all state machine code which could be confusing is properly commented
- [ ] Make sure state machine logic matches Msg method documentation
- [ ] Ensure that all state machine edge cases are covered with tests and that test coverage is sufficient (at least 90% coverage on module code)
- [ ] Assess potential threats for each method including spam attacks and ensure that threats have been addressed sufficiently. This should be done by writing up threat assessment for each method
- [ ] Assess potential risks of any new third party dependencies and decide whether a dependency audit is needed
- [ ] Completeness audit, fully implemented with tests (at least 1 person) (@assignee)
- [ ] Genesis import and export of all state
- [ ] Query services
- [ ] CLI methods
- [ ] All necessary migration scripts are present (if this is an upgrade of existing module)
### Published Release Checklist
After the above checks have been audited and the module is included in a tagged Release Candidate, the following additional checklist should be undertaken for live testing, and potentially a 3rd party audit (if deemed necessary):
- [ ] Testnet / devnet testing (2-3 people) (@assignee1, @assignee2, @assignee3)
- [ ] All Msg methods have been tested especially in light of any potential threats identified
- [ ] Genesis import and export has been tested
- [ ] Nice to have (and needed in some cases if threats could be high): Official 3rd party audit

View File

@ -1,50 +0,0 @@
<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->
## Description
Closes: #XXXX
<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->
---
### Author Checklist
*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*
I have...
- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed
### Reviewers Checklist
*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*
I have...
- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

View File

@ -1,37 +0,0 @@
## Description
Closes: #XXXX
<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->
---
### Author Checklist
*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*
I have...
- [ ] included the correct `docs:` prefix in the PR title
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the [documentation writing guidelines](https://github.com/cosmos/cosmos-sdk/blob/main/docs/DOC_WRITING_GUIDELINES.md)
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed
### Reviewers Checklist
*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*
I have...
- [ ] confirmed the correct `docs:` prefix in the PR title
- [ ] confirmed all author checklist items have been addressed
- [ ] confirmed that this PR only changes documentation
- [ ] reviewed content for consistency
- [ ] reviewed content for thoroughness
- [ ] reviewed content for spelling and grammar
- [ ] tested instructions (if applicable)

View File

@ -1,32 +0,0 @@
## Description
Closes: #XXXX
<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->
---
### Author Checklist
*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*
I have...
- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed
### Reviewers Checklist
*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*
I have...
- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed all author checklist items have been addressed
- [ ] confirmed that this PR does not change production code

View File

@ -1,36 +0,0 @@
# from https://github.com/MercymeIlya/last-workflow-status with fixes
name: "Get status of last workflow"
description: "Get conclusion of last workflow run on current branch."
branding:
icon: "arrow-left"
color: "yellow"
inputs:
github_token:
description: Secret GitHub API token to use for making API requests.
default: ${{ github.token }}
required: true
outputs:
last_status:
description: "Conclusion of last workflow run on current branch"
value: ${{ steps.last_status.outputs.last_status }}
runs:
using: "composite"
steps:
- name: Get workflow id
shell: bash
run: |
WORKFLOW_ID=$(curl --header 'authorization: Bearer ${{ inputs.github_token }}' \
--header 'content-type: application/json' \
https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }} | jq -r .workflow_id)
echo "WORKFLOW_ID=$WORKFLOW_ID" >> $GITHUB_ENV
echo "Workflow id: ${WORKFLOW_ID}"
- name: Get previous build status
shell: bash
id: last_status
run: |
last_status=$(curl --silent --header 'authorization: Bearer ${{ inputs.github_token }}' \
--header 'content-type: application/json' \
"https://api.github.com/repos/${{ github.repository }}/actions/workflows/${{ env.WORKFLOW_ID }}/runs?per_page=1&status=completed&branch=${{ env.GITHUB_HEAD_REF }}" \
| jq -r .workflow_runs[0].conclusion)
echo "Status of the previous build: $last_status"
echo "::set-output name=last_status::${last_status}"

106
.github/dependabot.yml vendored
View File

@ -1,106 +0,0 @@
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
- package-ecosystem: npm
directory: "/docs"
schedule:
interval: daily
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/simapp"
schedule:
interval: daily
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/tests"
schedule:
interval: daily
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/api"
schedule:
interval: weekly
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/orm"
schedule:
interval: weekly
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/core"
schedule:
interval: weekly
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/cosmovisor"
schedule:
interval: weekly
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/depinject"
schedule:
interval: weekly
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/errors"
schedule:
interval: weekly
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/math"
schedule:
interval: weekly
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/client/v2"
schedule:
interval: weekly
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/store/tools/ics23"
schedule:
interval: weekly
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/tx"
schedule:
interval: weekly
labels:
- "A:automerge"
- dependencies

64
.github/labeler.yml vendored
View File

@ -1,64 +0,0 @@
"C:x/auth":
- x/auth/**/*
"C:x/authz":
- x/authz/**/*
"C:x/bank":
- x/bank/**/*
"C:x/capability":
- x/capability/**/*
"C:x/crisis":
- x/crisis/**/*
"C:x/distribution":
- x/distribution/**/*
"C:x/evidence":
- x/evidence/**/*
"C:x/feegrant":
- x/feegrant/**/*
"C:x/genutil":
- x/genutil/**/*
"C:x/gov":
- x/gov/**/*
"C:x/group":
- x/group/**/*
"C:x/mint":
- x/mint/**/*
"C:x/nft":
- x/nft/**/*
"C:x/params":
- x/params/**/*
"C:Simulations":
- x/simulation/**/*
- x/*/simulation/**/*
"C:x/slashing":
- x/slashing/**/*
"C:x/staking":
- x/staking/**/*
"C:x/upgrade":
- x/upgrade/**/*
"C:Cosmovisor":
- cosmovisor/**/*
"C:Rosetta":
- contrib/rosetta/**/*
"C:Keys":
- client/keys/**/*
"Type: Build":
- Makefile
- Dockerfile
- docker-compose.yml
- scripts/*
"Type: CI":
- .github/**/*.yml
- buf.yaml
- .mergify.yml
- .golangci.yml
"C:CLI":
- client/**/*
- x/*/client/**/*
"Type: ADR":
- docs/architecture/**/*
"C:container":
- container/**/*
"C:Store":
- store/**/*
"C:orm":
- orm/**/*

View File

@ -1,58 +0,0 @@
name: Atlas
# Atlas checks if a modules atlas manifest has been touched, if so it publishes the updated version
on:
push:
branches:
- main
paths:
- "x/**/atlas/*"
pull_request:
paths:
- "x/**/atlas/*"
jobs:
auth:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.1
id: git_diff
with:
PATTERNS: |
x/auth/atlas/**
- uses: marbar3778/atlas_action@main
with:
token: ${{ secrets.ATLAS_TOKEN }}
path: ./x/auth/atlas/atlas.toml
dry-run: ${{ github.event_name != 'pull_request' }}
if: env.GIT_DIFF
bank:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.1
id: git_diff
with:
PATTERNS: |
x/bank/atlas/**
- uses: marbar3778/atlas_action@main
with:
token: ${{ secrets.ATLAS_TOKEN }}
path: ./x/bank/atlas/atlas.toml
dry-run: ${{ github.event_name != 'pull_request' }}
if: env.GIT_DIFF
evidence:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.1
id: git_diff
with:
PATTERNS: |
x/evidence/atlas/**
- uses: marbar3778/atlas_action@main
with:
token: ${{ secrets.ATLAS_TOKEN }}
path: ./x/evidence/atlas/manifest.toml
dry-run: ${{ github.event_name != 'pull_request' }}
if: env.GIT_DIFF

View File

@ -1,38 +0,0 @@
name: Build Docs
# This workflow runs when a PR is labeled with `docs`
# This will check if the docs build successfully by running `make build-docs`
on:
pull_request:
branches:
- main
- "release/**"
paths:
- "docs/**"
- "x/**/*.md"
- .github/workflows/deploy-docs.yml
- .github/workflows/build-docs.yml
permissions:
contents: read
jobs:
check-docs-build:
name: Check docs build
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Node.js 🔧
uses: actions/setup-node@v3
with:
node-version: "16.x"
# npm install npm should be removed when https://github.com/npm/cli/issues/4942 is fixed
- name: Build docs 🔧
run: |
npm install -g npm@8.5.5
make build-docs

View File

@ -1,18 +0,0 @@
name: Build SimApp
# This workflow allows to skip the build step if the PR does not contain any changes to the code
# See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
on:
pull_request:
paths-ignore:
- "**/*.go"
- "go.mod"
- "go.sum"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ["amd64", "arm", "arm64"]
steps:
- run: 'echo "No build required"'

View File

@ -1,41 +0,0 @@
name: Build SimApp
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed
on:
pull_request:
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
push:
branches:
- main
- release/**
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}-build
cancel-in-progress: true
jobs:
build:
runs-on: buildjet-4vcpu-ubuntu-2004
strategy:
matrix:
go-arch: ["amd64", "arm", "arm64"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Build
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build
- name: Build Legacy
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false COSMOS_BUILD_OPTIONS=legacy make build
- name: Build Cosmovisor
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make cosmovisor

View File

@ -1,17 +0,0 @@
name: Remove GitHub Action Old Artifacts
on:
schedule:
# Every day at 1am
- cron: "0 1 * * *"
jobs:
remove-old-artifacts:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Remove old artifacts
uses: c-hive/gha-remove-artifacts@v1
with:
age: "7 days"

View File

@ -1,57 +0,0 @@
name: "CodeQL"
on:
pull_request:
paths:
- "**.go"
push:
branches:
- main
- release/**
paths:
- "**.go"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
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@v2
# 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@v2

View File

@ -1,40 +0,0 @@
name: Release Cosmovisor
on:
push:
tags:
- "cosmovisor/v*.*.*"
permissions:
contents: read
jobs:
goreleaser:
permissions:
contents: write # for goreleaser/goreleaser-action to create a GitHub release
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: 1.19
# get 'v*.*.*' part from 'cosmovisor/v*.*.*' and save to $GITHUB_ENV
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/cosmovisor/}" >> $GITHUB_ENV
# remove the possible pre-existing same tag for cosmos-sdk related tags instead of cosmovisor tags
# Because goreleaser enforces semantic versioning and will error on non compliant tags.(https://goreleaser.com/limitations/semver/)
- name: Tag without prefix locally to avoid error in goreleaser
run: |-
git tag -d ${{ env.RELEASE_VERSION }} || echo "No such a tag exists before"
git tag ${{ env.RELEASE_VERSION }} HEAD
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
# stick to version v0.179.0(https://github.com/cosmos/cosmos-sdk/issues/11125)
version: v0.179.0
args: release --rm-dist --skip-validate
workdir: cosmovisor
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: cosmovisor/${{ env.RELEASE_VERSION }}

View File

@ -1,37 +0,0 @@
name: Dependabot Update All Go Modules
on: pull_request
permissions:
pull-requests: write
jobs:
update-all:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
# Secret to be added in the repo under Settings > Secrets > Dependabot
token: ${{ secrets.PRBOT_PAT }}
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Extract updated dependency
id: deps
run: |
# Extract the dependency name from the PR title
# Example: "build(deps): Bump github.com/cosmos/cosmos-sdk from 0.46.0 to 0.47.0"
# Extracts "github.com/cosmos/cosmos-sdk" and "0.47.0"
echo "::set-output name=name::$(echo "${{ github.event.pull_request.title }}" | cut -d ' ' -f 3)"
echo "::set-output name=version::$(echo "${{ github.event.pull_request.title }}" | cut -d ' ' -f 7)"
- name: Update all Go modules
run: |
./scripts/go-update-dep-all.sh ${{ format('{0}@v{1}', steps.deps.outputs.name, steps.deps.outputs.version) }}
./scripts/go-mod-tidy-all.sh
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "${{ github.event.pull_request.title }} for all modules"

View File

@ -1,19 +0,0 @@
name: "Dependency Review"
on: pull_request
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: "Checkout Repository"
uses: actions/checkout@v3
- name: "Dependency Review"
uses: actions/dependency-review-action@v2
- name: "Dependency audit"
run: ./scripts/dep-assert.sh

View File

@ -1,46 +0,0 @@
name: Deploy docs
# This job builds and deploys documenation to github pages.
# It runs on every push to main with a change in the docs folder.
on:
push:
branches:
- main
- "release/**"
paths:
- "docs/**"
- "x/**/*.md"
- .github/workflows/deploy-docs.yml
permissions:
contents: read
jobs:
build-and-deploy:
permissions:
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
path: "."
- name: Setup Node.js 🔧
uses: actions/setup-node@v3
with:
node-version: "16.x"
# npm install npm should be removed when https://github.com/npm/cli/issues/4942 is fixed
- name: Build 🔧
run: |
npm install -g npm@8.5.5
make build-docs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages
folder: ~/output
single-commit: true

View File

@ -1,65 +0,0 @@
name: Build & Push
# Build & Push builds the simapp docker image on every push to main and
# and pushes the image to https://hub.docker.com/r/interchainio/simapp/tags
on:
pull_request:
paths:
- "Dockerfile"
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=interchainio/simapp
VERSION=noop
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then
VERSION=latest
fi
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:${VERSION}"
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish to Docker Hub
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}

View File

@ -1,39 +0,0 @@
# This CI is disabled on main and meant to be enabled on forks as an easy way to cherry pick fork commits into main.
# In order to submit a PR from your repo to the Cosmos SDK, a PRBOT_PAT secret (personal access token) must be available for the GitHub Action (Settings > Secrets > Actions).
# The PR will be submitted from the user of the PAT. Note, the PRBOT_PAT user must have write access to the repo.
name: Cherry pick PR to Cosmos SDK
on:
# Set to trigger on every merge to main, not just a closed PR.
workflow_dispatch:
pull_request_target:
branches:
- main
types: ["closed"]
jobs:
cherry_pick:
permissions: write-all
runs-on: ubuntu-latest
name: Cherry pick into main
if: github.event.pull_request.merged == true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create PR Patch Branch
shell: bash
env:
PR_NAME: pr-patch-${{ github.sha }}
run: |
git config --global user.name "${{ github.actor }}" # Config have to be set for pushing the cherry-picked changes onto fork pr-patch branch.
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git remote add upstream https://github.com/cosmos/cosmos-sdk.git
git fetch --all # Get the latest code
git checkout -b $PR_NAME upstream/main # Create new branch based on main branch
git cherry-pick -X theirs ${{ github.sha }} # Cherry pick the latest commit of PR
git push -u origin $PR_NAME # Push your changes to the remote branch
- name: Autocreate PR
shell: bash
env:
GH_TOKEN: ${{ secrets.PRBOT_PAT }}
run: |
gh pr create --repo cosmos/cosmos-sdk --base main --head "${{ github.event.repository.owner.login }}:pr-patch-${{ github.sha }}" --title "${{ github.event.pull_request.title }}" --body "Automated PR for commit: ${{ github.sha }} from ${{ github.repository }}"

View File

@ -1,38 +0,0 @@
name: Run Gosec
on:
pull_request:
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
push:
branches:
- main
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
jobs:
Gosec:
permissions:
security-events: write
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Run Gosec Security Scanner
uses: cosmos/gosec@master
with:
# we let the report trigger content trigger a failure using the GitHub Security features.
args: "-no-fail -fmt sarif -out results.sarif ./..."
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
# Path to SARIF file relative to the root of the repository
sarif_file: results.sarif

View File

@ -1,17 +0,0 @@
name: "Pull Request Labeler"
on:
- pull_request_target
permissions:
contents: read
jobs:
labeler:
permissions:
contents: read # for actions/labeler to determine modified files
pull-requests: write # for actions/labeler to add labels to PRs
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

View File

@ -1,22 +0,0 @@
name: "Lint PR"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
permissions:
contents: read
jobs:
main:
permissions:
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,26 +0,0 @@
name: Lint
on:
push:
branches:
- main
- release/**
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
# ci is set to go1.19 to match developer setups
go-version: 1.19
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.50.0

View File

@ -1,12 +0,0 @@
name: Check Markdown links
on:
schedule:
- cron: '* */24 * * *'
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.14
with:
folder-path: "docs"

View File

@ -1,17 +0,0 @@
name: Add PR to project
on:
pull_request:
types:
- opened
- reopened
jobs:
add-to-project:
name: Add pull request to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.3.0
with:
project-url: https://github.com/orgs/cosmos/projects/26
github-token: ${{ secrets.PERSONAL_TOKEN }}

View File

@ -1,67 +0,0 @@
name: Build & Push SDK Proto Builder
on:
push:
branches:
- main
paths:
- "contrib/devtools/Dockerfile"
workflow_dispatch:
inputs:
tags:
description: "Docker image tags"
required: true
type: string
pull_request:
paths:
- "contrib/devtools/Dockerfile"
env:
REGISTRY: ghcr.io
IMAGE_NAME: cosmos/proto-builder
# Allow one concurrent deployment
concurrency:
group: "proto-docker"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
# set VERSION to new version when making changes, when merged to main the image will automatically be pushed
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# modify value when deploying a new version
tags: |
type=semver,pattern={{version}},value=${{ inputs.tags }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to GHCR
uses: docker/build-push-action@v3
with:
context: ./contrib/devtools
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -1,20 +0,0 @@
name: Buf-Push
# Protobuf runs buf (https://buf.build/) push updated proto files to https://buf.build/cosmos/cosmos-sdk
# This workflow is only run when a .proto file has been changed
on:
push:
branches:
- main
paths:
- "proto/**"
jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1.8.0
- uses: bufbuild/buf-push-action@v1
with:
input: "proto"
buf_token: ${{ secrets.BUF_TOKEN }}

View File

@ -1,31 +0,0 @@
name: Protobuf
# Protobuf runs buf (https://buf.build/) lint and check-breakage
# This workflow is only run when a .proto file has been changed
on:
pull_request:
paths:
- "proto/**"
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1.8.0
- uses: bufbuild/buf-lint-action@v1
with:
input: "proto"
break-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1.8.0
- uses: bufbuild/buf-breaking-action@v1
with:
input: "proto"
against: "https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto"

View File

@ -1,31 +0,0 @@
name: Release
# This workflow helps with creating releases.
# This job will only be triggered when a tag (vX.X.x) is pushed
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
permissions:
contents: read
jobs:
release:
permissions:
contents: write # for goreleaser/goreleaser-action to create a GitHub release
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Unshallow
run: git fetch --prune --unshallow
- name: Create release
uses: goreleaser/goreleaser-action@v3
with:
args: release --rm-dist --release-notes ./RELEASE_NOTES.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,140 +0,0 @@
name: Sims release/0.45.x
# Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import, multi-seed-short)
# This workflow will run on all Pull Requests, if a .go, .mod or .sum file have been changed
on:
schedule:
- cron: "0 0,12 * * *"
release:
types: [published]
concurrency:
group: ci-${{ github.ref }}-sims-045
cancel-in-progress: true
jobs:
build:
runs-on: buildjet-4vcpu-ubuntu-2004
if: "!contains(github.event.head_commit.message, 'skip-sims')"
steps:
- uses: actions/checkout@v3
with:
ref: "release/v0.45.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19
- run: make build
install-runsim:
permissions:
contents: none
runs-on: buildjet-4vcpu-ubuntu-2004
needs: build
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
test-sim-import-export:
runs-on: buildjet-4vcpu-ubuntu-2004
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v3
with:
ref: "release/v0.45.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-import-export
run: |
make test-sim-import-export
test-sim-after-import:
runs-on: buildjet-4vcpu-ubuntu-2004
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v3
with:
ref: "release/v0.45.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-after-import
run: |
make test-sim-after-import
test-sim-multi-seed-short:
runs-on: buildjet-4vcpu-ubuntu-2004
needs: [build, install-runsim]
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
ref: "release/v0.45.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-multi-seed-short
run: |
make test-sim-multi-seed-short
sims-notify-success:
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
runs-on: ubuntu-latest
if: ${{ success() }}
steps:
- uses: actions/checkout@v3
- name: Get previous workflow status
uses: ./.github/actions/last-workflow-status
id: last_status
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Slack on success
if: ${{ steps.last_status.outputs.last_status == 'failure' }}
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cosmos-sdk-sims
SLACK_USERNAME: Sim Tests release/0.45.x
SLACK_ICON_EMOJI: ":white_check_mark:"
SLACK_COLOR: good
SLACK_MESSAGE: 0.45.x Sims are passing
SLACK_FOOTER: ""
sims-notify-failure:
permissions:
contents: none
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- name: Notify Slack on failure
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cosmos-sdk-sims
SLACK_USERNAME: Sim Tests release/0.45.x
SLACK_ICON_EMOJI: ":skull:"
SLACK_COLOR: danger
SLACK_MESSAGE: 0.45.x Sims are failing
SLACK_FOOTER: ""

View File

@ -1,140 +0,0 @@
name: Sims release/0.46.x
# Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import, multi-seed-short)
# This workflow will run on all Pull Requests, if a .go, .mod or .sum file have been changed
on:
schedule:
- cron: "0 0,12 * * *"
release:
types: [published]
concurrency:
group: ci-${{ github.ref }}-sims-046
cancel-in-progress: true
jobs:
build:
runs-on: buildjet-4vcpu-ubuntu-2004
if: "!contains(github.event.head_commit.message, 'skip-sims')"
steps:
- uses: actions/checkout@v3
with:
ref: "release/v0.46.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19
- run: make build
install-runsim:
permissions:
contents: none
runs-on: buildjet-4vcpu-ubuntu-2004
needs: build
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
test-sim-import-export:
runs-on: buildjet-4vcpu-ubuntu-2004
needs: [build, install-runsim]
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
ref: "release/v0.46.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-import-export
run: |
make test-sim-import-export
test-sim-after-import:
runs-on: buildjet-4vcpu-ubuntu-2004
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v3
with:
ref: "release/v0.46.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-after-import
run: |
make test-sim-after-import
test-sim-multi-seed-short:
runs-on: buildjet-4vcpu-ubuntu-2004
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v3
with:
ref: "release/v0.46.x"
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-multi-seed-short
run: |
make test-sim-multi-seed-short
sims-notify-success:
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
runs-on: ubuntu-latest
if: ${{ success() }}
steps:
- uses: actions/checkout@v3
- name: Get previous workflow status
uses: ./.github/actions/last-workflow-status
id: last_status
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Slack on success
if: ${{ steps.last_status.outputs.last_status == 'failure' }}
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cosmos-sdk-sims
SLACK_USERNAME: Sim Tests release/0.46.x
SLACK_ICON_EMOJI: ":white_check_mark:"
SLACK_COLOR: good
SLACK_MESSAGE: 0.46.x Sims are passing
SLACK_FOOTER: ""
sims-notify-failure:
permissions:
contents: none
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- name: Notify Slack on failure
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cosmos-sdk-sims
SLACK_USERNAME: Sim Tests release/0.46.x
SLACK_ICON_EMOJI: ":skull:"
SLACK_COLOR: danger
SLACK_MESSAGE: 0.46.x Sims are failing
SLACK_FOOTER: ""

View File

@ -1,89 +0,0 @@
name: Sims Nightly (Long)
# Release Sims workflow runs long-lived (multi-seed & large block size) simulations
# This workflow only runs mightly at 8am UTC and on releases
on:
schedule:
- cron: "0 8 * * *"
release:
types: [published]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}-sims-nightly-long
cancel-in-progress: true
jobs:
install-runsim:
permissions:
contents: none
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
test-sim-multi-seed-long:
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-multi-seed-long
run: |
make test-sim-multi-seed-long
sims-notify-success:
needs: [test-sim-multi-seed-long]
runs-on: ubuntu-latest
if: ${{ success() }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Get previous workflow status
uses: ./.github/actions/last-workflow-status
id: last_status
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Slack on success
if: ${{ steps.last_status.outputs.last_status == 'failure' }}
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cosmos-sdk-sims
SLACK_USERNAME: Sim Tests
SLACK_ICON_EMOJI: ":white_check_mark:"
SLACK_COLOR: good
SLACK_MESSAGE: Sims Nightly (Long) are passing
SLACK_FOOTER: ""
sims-notify-failure:
permissions:
contents: none
needs: [test-sim-multi-seed-long]
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- name: Notify Slack on failure
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cosmos-sdk-sims
SLACK_USERNAME: Sim Tests
SLACK_ICON_EMOJI: ":skull:"
SLACK_COLOR: danger
SLACK_MESSAGE: Sims Nightly (Long) are failing
SLACK_FOOTER: ""

View File

@ -1,142 +0,0 @@
name: Sims
# Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import, multi-seed-short)
# This workflow will run on all Pull Requests, if a .go, .mod or .sum file have been changed
on:
schedule:
- cron: "0 */2 * * *"
release:
types: [published]
concurrency:
group: ci-${{ github.ref }}-sims
cancel-in-progress: true
jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for technote-space/get-diff-action to get git reference
runs-on: buildjet-4vcpu-ubuntu-2004
if: "!contains(github.event.head_commit.message, 'skip-sims')"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Get data from Go build cache
if: ${{ false }}
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/golangci-lint
~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- run: make build
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
test-sim-import-export:
runs-on: buildjet-4vcpu-ubuntu-2004
needs: [build]
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-import-export
run: |
make test-sim-import-export
test-sim-after-import:
runs-on: buildjet-4vcpu-ubuntu-2004
needs: [build]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-after-import
run: |
make test-sim-after-import
test-sim-multi-seed-short:
runs-on: buildjet-4vcpu-ubuntu-2004
needs: [build]
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-multi-seed-short
run: |
make test-sim-multi-seed-short
sims-notify-success:
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
runs-on: ubuntu-latest
if: ${{ success() }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Get previous workflow status
uses: ./.github/actions/last-workflow-status
id: last_status
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Slack on success
if: ${{ steps.last_status.outputs.last_status == 'failure' }}
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cosmos-sdk-sims
SLACK_USERNAME: Sim Tests
SLACK_ICON_EMOJI: ":white_check_mark:"
SLACK_COLOR: good
SLACK_MESSAGE: Sims are passing
SLACK_FOOTER: ""
sims-notify-failure:
permissions:
contents: none
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- name: Notify Slack on failure
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cosmos-sdk-sims
SLACK_USERNAME: Sim Tests
SLACK_ICON_EMOJI: ":skull:"
SLACK_COLOR: danger
SLACK_MESSAGE: Sims are failing
SLACK_FOOTER: ""

View File

@ -1,26 +0,0 @@
name: "Close stale issues & pull requests"
on:
schedule:
- cron: "0 0 * * *"
permissions:
contents: read
jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: "This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions."
days-before-stale: -1
days-before-close: -1
days-before-pr-stale: 45
days-before-pr-close: 6
exempt-pr-labels: "pinned, security, proposal, blocked"

View File

@ -1,23 +0,0 @@
# Staticmajor: Static analyzer to catch leaking resources & other bad code patterns
name: Detect leaking resources and bad code patterns
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
run_staticmajor:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Staticmajor action
id: staticmajor
uses: orijtech/staticmajor-action@main
with:
packages: ./...
resleak: true
structslop: false
tests: false

View File

@ -1,15 +0,0 @@
name: Tests E2E
# This workflow allows to skip the e2e step if the PR does not contain any changes to the code
# See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
on:
pull_request:
paths-ignore:
- "**/*.go"
- "go.mod"
- "go.sum"
jobs:
test-e2e:
runs-on: ubuntu-latest
steps:
- run: 'echo "No e2e tests required"'

View File

@ -1,30 +0,0 @@
name: Tests E2E
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed
on:
pull_request:
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
push:
branches:
- main
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
permissions:
contents: read
jobs:
test-e2e:
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: e2e tests
run: |
make test-e2e

View File

@ -1,15 +0,0 @@
name: Tests Integration
# This workflow allows to skip the integration step if the PR does not contain any changes to the code
# See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
on:
pull_request:
paths-ignore:
- "**/*.go"
- "go.mod"
- "go.sum"
jobs:
test-integration:
runs-on: ubuntu-latest
steps:
- run: 'echo "No integration tests required"'

View File

@ -1,30 +0,0 @@
name: Tests Integration
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed
on:
pull_request:
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
push:
branches:
- main
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
permissions:
contents: read
jobs:
test-integration:
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: integration tests
run: |
make test-integration

View File

@ -1,120 +0,0 @@
name: Tests (Legacy App)
on:
schedule:
- cron: "0 0,12 * * *"
release:
types: [published]
concurrency:
group: ci-${{ github.ref }}-tests-legacy
cancel-in-progress: true
jobs:
test-submodules:
runs-on: ubuntu-latest
container: tendermintdev/docker-tm-db-testing
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Run submodule tests and create test coverage profile.
run: bash scripts/module-tests.sh
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-go-submodules-coverage"
path: ./coverage-go-submod-profile.out
split-test-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- 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
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-00"
path: ./pkgs.txt.part.00
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-01"
path: ./pkgs.txt.part.01
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-02"
path: ./pkgs.txt.part.02
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-03"
path: ./pkgs.txt.part.03
tests:
runs-on: ubuntu-latest
needs: split-test-files
strategy:
fail-fast: false
matrix:
part: ["00", "01", "02", "03"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}"
- name: test & coverage report creation
run: |
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='legacy_simapp norace ledger test_ledger_mock'
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}-coverage"
path: ./${{ matrix.part }}profile.out
sims-notify-success:
needs: tests
runs-on: ubuntu-latest
if: ${{ success() }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Get previous workflow status
uses: ./.github/actions/last-workflow-status
id: last_status
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Slack on success
if: ${{ steps.last_status.outputs.last_status == 'failure' }}
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cosmos-sdk-legacy-app
SLACK_USERNAME: Legacy App Tests
SLACK_ICON_EMOJI: ":white_check_mark:"
SLACK_COLOR: good
SLACK_MESSAGE: Legacy app tests are passing
SLACK_FOOTER: ""
sims-notify-failure:
needs: tests
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- name: Notify Slack on failure
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cosmos-sdk-legacy-app
SLACK_USERNAME: Legacy App Tests
SLACK_ICON_EMOJI: ":skull:"
SLACK_COLOR: danger
SLACK_MESSAGE: Legacy app tests are failing
SLACK_FOOTER: ""

View File

@ -1,251 +0,0 @@
name: Tests / Code Coverage
# Tests / Code Coverage workflow runs unit tests and uploads a code coverage report
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}-tests
cancel-in-progress: true
jobs:
test-submodules:
runs-on: buildjet-4vcpu-ubuntu-2004
container: tendermintdev/docker-tm-db-testing
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: technote-space/get-diff-action@v6.1.1
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Get data from Go build cache
# if: env.GIT_DIFF
if: ${{ false }}
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/golangci-lint
~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- 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@v3
with:
name: "${{ github.sha }}-go-submodules-coverage"
path: ./coverage-go-submod-profile.out
split-test-files:
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- 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
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-00"
path: ./pkgs.txt.part.00
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-01"
path: ./pkgs.txt.part.01
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-02"
path: ./pkgs.txt.part.02
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-03"
path: ./pkgs.txt.part.03
tests:
runs-on: buildjet-4vcpu-ubuntu-2004
needs: split-test-files
strategy:
fail-fast: false
matrix:
part: ["00", "01", "02", "03"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Get data from Go build cache
# if: env.GIT_DIFF
if: ${{ false }}
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/golangci-lint
~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}"
if: env.GIT_DIFF
- name: test & coverage report creation
run: |
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -race -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='ledger test_ledger_mock'
if: env.GIT_DIFF
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}-coverage"
path: ./${{ matrix.part }}profile.out
upload-coverage-report:
runs-on: buildjet-4vcpu-ubuntu-2004
needs: tests
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-00-coverage"
if: env.GIT_DIFF
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-01-coverage"
if: env.GIT_DIFF
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-02-coverage"
if: env.GIT_DIFF
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-03-coverage"
if: env.GIT_DIFF
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-go-submodules-coverage"
if: env.GIT_DIFF
continue-on-error: true
- run: |
cat ./*profile.out | grep -v "mode: atomic" >> coverage.txt
if: env.GIT_DIFF
- name: filter out DONTCOVER
run: |
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')"
excludelist+=" $(find ./ -type f -name '*.pb.go')"
excludelist+=" $(find ./ -type f -name '*.pb.gw.go')"
excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')"
for filename in ${excludelist}; do
filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g')
echo "Excluding ${filename} from coverage report..."
sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt
done
if: env.GIT_DIFF
- uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
if: env.GIT_DIFF
test-rosetta:
runs-on: buildjet-4vcpu-ubuntu-2004
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.1
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Get data from Go build cache
# if: env.GIT_DIFF
if: ${{ false }}
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/golangci-lint
~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: test rosetta
run: |
make test-rosetta
# if: env.GIT_DIFF
liveness-test:
runs-on: buildjet-4vcpu-ubuntu-2004
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: technote-space/get-diff-action@v6.1.1
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Get data from Go build cache
# if: env.GIT_DIFF
if: ${{ false }}
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/golangci-lint
~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: start localnet
run: |
make clean localnet-start
if: env.GIT_DIFF
- name: test liveness
run: |
./contrib/localnet_liveness.sh 100 5 50 localhost
if: env.GIT_DIFF
test-sim-nondeterminism:
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: test-sim-nondeterminism
run: |
make test-sim-nondeterminism
if: env.GIT_DIFF