Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into deepto98/remove-sdk.D…
Browse files Browse the repository at this point in the history
…BBackend
  • Loading branch information
deepto98 committed Jul 3, 2022
2 parents 05ddb2c + 686c50d commit 7ade061
Show file tree
Hide file tree
Showing 173 changed files with 3,854 additions and 1,470 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths:
- "docs/**"

permissions:
contents: read

jobs:
check-docs-build:
if: ${{ github.event.label.name == 'docs' }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cosmovisor-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ 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
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ on:
- "docs/**"
- "x/**/*.md"

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
container:
image: tendermintdev/docker-website-deployment
Expand All @@ -27,7 +32,7 @@ jobs:
make build-docs LEDGER_ENABLED=false
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.3.3
uses: JamesIves/github-pages-deploy-action@v4.3.4
with:
branch: gh-pages
folder: ~/output
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ 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
Expand Down
152 changes: 152 additions & 0 deletions .github/workflows/legacy-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: Legacy App Testing
on:
schedule:
- cron: "0 0,12 * * *"
release:
types: [published]

jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ["amd64", "arm", "arm64"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Build
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build

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

- 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-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.18
- 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: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
- 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.18
- 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 -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='legacy_simapp norace 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

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: ""
6 changes: 6 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ on:
- 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@v4.5.0
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ on:
push:
branches:
- main
permissions:
contents: read

jobs:
golangci:
permissions:
pull-requests: read # for technote-space/get-diff-action to get git reference
name: golangci-lint
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
paths:
- "proto/**"

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
branches:
- "rc**"

permissions:
contents: read

jobs:
test-sim-multi-seed-long:
runs-on: buildjet-4vcpu-ubuntu-2004
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ on:
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
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/sims-045.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:

jobs:
cleanup-runs:
permissions:
actions: write # for rokroskar/workflow-run-cleanup-action to obtain workflow name & cancel it
contents: read # for rokroskar/workflow-run-cleanup-action to obtain branch
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
Expand All @@ -28,6 +31,8 @@ jobs:
- run: make build

install-runsim:
permissions:
contents: none
runs-on: buildjet-4vcpu-ubuntu-2004
needs: build
steps:
Expand Down Expand Up @@ -132,6 +137,8 @@ jobs:
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
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/sims-046.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:

jobs:
cleanup-runs:
permissions:
actions: write # for rokroskar/workflow-run-cleanup-action to obtain workflow name & cancel it
contents: read # for rokroskar/workflow-run-cleanup-action to obtain branch
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
Expand All @@ -28,6 +31,8 @@ jobs:
- run: make build

install-runsim:
permissions:
contents: none
runs-on: buildjet-4vcpu-ubuntu-2004
needs: build
steps:
Expand Down Expand Up @@ -132,6 +137,8 @@ jobs:
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
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:

jobs:
cleanup-runs:
permissions:
actions: write # for rokroskar/workflow-run-cleanup-action to obtain workflow name & cancel it
contents: read # for rokroskar/workflow-run-cleanup-action to obtain branch
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
Expand All @@ -17,6 +20,9 @@ jobs:
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

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:
Expand Down Expand Up @@ -130,6 +136,8 @@ jobs:
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
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ 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@v5
Expand Down
Loading

0 comments on commit 7ade061

Please sign in to comment.