ci: further improve gh actions (#13361)
This commit is contained in:
parent
df40c0a9d1
commit
555d774c73
1
.github/labeler.yml
vendored
1
.github/labeler.yml
vendored
@ -60,6 +60,5 @@
|
||||
- container/**/*
|
||||
"C:Store":
|
||||
- store/**/*
|
||||
- db/**/*
|
||||
"C:orm":
|
||||
- orm/**/*
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
name: Check docs build
|
||||
name: Build Docs
|
||||
# This workflow runs when a PR is labeled with `docs`
|
||||
# This will check if the docs build successfully by running `npm run build`
|
||||
# This will check if the docs build successfully by running `make build-docs`
|
||||
on:
|
||||
pull_request:
|
||||
types: [ labeled ]
|
||||
paths:
|
||||
- "docs/**"
|
||||
types: [labeled]
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "x/**/*.md"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@ -23,8 +24,6 @@ jobs:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies and build docs 🧱
|
||||
- name: Build docs
|
||||
run: |
|
||||
cd docs
|
||||
npm install
|
||||
npm run build
|
||||
make build-docs LEDGER_ENABLED=false
|
||||
17
.github/workflows/build-skip.yml
vendored
Normal file
17
.github/workflows/build-skip.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: Build SimApp
|
||||
# This workflow allows to skip the build step if the PR does not contain any changes to the code
|
||||
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"'
|
||||
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -9,6 +9,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release/**
|
||||
paths:
|
||||
- "**/*.go"
|
||||
- "go.mod"
|
||||
@ -16,7 +17,9 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency: ci-${{ github.ref }}
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}-build
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
2
.github/workflows/dependencies-review.yml
vendored
2
.github/workflows/dependencies-review.yml
vendored
@ -1,5 +1,5 @@
|
||||
name: "Dependency Review"
|
||||
on: [pull_request]
|
||||
on: pull_request
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
3
.github/workflows/lint.yml
vendored
3
.github/workflows/lint.yml
vendored
@ -1,10 +1,9 @@
|
||||
name: Lint
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- main
|
||||
- release/**
|
||||
pull_request:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
13
.github/workflows/proto-docker.yml
vendored
13
.github/workflows/proto-docker.yml
vendored
@ -8,8 +8,8 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tags:
|
||||
description: 'Docker image tags'
|
||||
required: true
|
||||
description: "Docker image tags"
|
||||
required: true
|
||||
type: string
|
||||
pull_request:
|
||||
paths:
|
||||
@ -19,7 +19,7 @@ env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: cosmos/proto-builder
|
||||
|
||||
# Allow one concurrent deployment
|
||||
# Allow one concurrent deployment
|
||||
concurrency:
|
||||
group: "proto-docker"
|
||||
cancel-in-progress: true
|
||||
@ -36,7 +36,7 @@ jobs:
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
@ -47,16 +47,15 @@ jobs:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
# modify value when deploying a new version
|
||||
tags: |
|
||||
type=semver,pattern={{version}},value=${{ inputs.tags }}
|
||||
type=semver,pattern={{version}},value=${{ inputs.tags }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
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
|
||||
|
||||
39
.github/workflows/release-sims.yml
vendored
39
.github/workflows/release-sims.yml
vendored
@ -1,39 +0,0 @@
|
||||
name: Release Sims
|
||||
# Release Sims workflow runs long-lived (multi-seed & large block size) simulations
|
||||
# This workflow only runs on a pull request when the branch contains rc** (rc1/vX.X.x)
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "rc**"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test-sim-multi-seed-long:
|
||||
runs-on: buildjet-4vcpu-ubuntu-2004
|
||||
if: "!contains(github.event.head_commit.message, 'skip-sims')"
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/go/bin
|
||||
key: ${{ runner.os }}-go-runsim-binary
|
||||
- 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') }}
|
||||
|
||||
- run: |
|
||||
make build
|
||||
|
||||
- name: test-sim-multi-seed-long
|
||||
run: |
|
||||
make test-sim-multi-seed-long
|
||||
14
.github/workflows/sims-045.yml
vendored
14
.github/workflows/sims-045.yml
vendored
@ -7,7 +7,9 @@ on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
concurrency: ci-${{ github.ref }}
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}-sims-045
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -20,8 +22,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- run: make build
|
||||
|
||||
install-runsim:
|
||||
@ -33,8 +33,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- name: Install runsim
|
||||
run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
|
||||
- uses: actions/cache@v3
|
||||
@ -52,8 +50,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/go/bin
|
||||
@ -72,8 +68,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/go/bin
|
||||
@ -93,8 +87,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/go/bin
|
||||
|
||||
14
.github/workflows/sims-046.yml
vendored
14
.github/workflows/sims-046.yml
vendored
@ -7,7 +7,9 @@ on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
concurrency: ci-${{ github.ref }}
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}-sims-046
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -20,8 +22,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- run: make build
|
||||
|
||||
install-runsim:
|
||||
@ -33,8 +33,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- name: Install runsim
|
||||
run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
|
||||
- uses: actions/cache@v3
|
||||
@ -53,8 +51,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/go/bin
|
||||
@ -73,8 +69,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/go/bin
|
||||
@ -93,8 +87,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/go/bin
|
||||
|
||||
89
.github/workflows/sims-nightly.yml
vendored
Normal file
89
.github/workflows/sims-nightly.yml
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
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.18
|
||||
- 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.18
|
||||
- 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: ""
|
||||
9
.github/workflows/sims.yml
vendored
9
.github/workflows/sims.yml
vendored
@ -7,7 +7,9 @@ on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
concurrency: ci-${{ github.ref }}
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}-sims
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -21,8 +23,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- uses: technote-space/get-diff-action@v6.1.0
|
||||
with:
|
||||
PATTERNS: |
|
||||
@ -30,7 +30,6 @@ jobs:
|
||||
go.mod
|
||||
go.sum
|
||||
- name: Get data from Go build cache
|
||||
# if: env.GIT_DIFF
|
||||
if: ${{ false }}
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
@ -56,8 +55,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/go/bin
|
||||
|
||||
14
.github/workflows/test-e2e-skip.yml
vendored
Normal file
14
.github/workflows/test-e2e-skip.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
name: Tests E2E
|
||||
# This workflow allows to skip the e2e step if the PR does not contain any changes to the code
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "**/*.go"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
|
||||
jobs:
|
||||
test-e2e:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "No e2e tests required"'
|
||||
2
.github/workflows/test-e2e.yml
vendored
2
.github/workflows/test-e2e.yml
vendored
@ -19,7 +19,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
test-e2e:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: buildjet-4vcpu-ubuntu-2004
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
|
||||
14
.github/workflows/test-integration-skip.yml
vendored
Normal file
14
.github/workflows/test-integration-skip.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
name: Tests Integration
|
||||
# This workflow allows to skip the integration step if the PR does not contain any changes to the code
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "**/*.go"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
|
||||
jobs:
|
||||
test-integration:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "No integration tests required"'
|
||||
2
.github/workflows/test-integration.yml
vendored
2
.github/workflows/test-integration.yml
vendored
@ -19,7 +19,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
test-integration:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: buildjet-4vcpu-ubuntu-2004
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
|
||||
6
.github/workflows/test-legacy.yml
vendored
6
.github/workflows/test-legacy.yml
vendored
@ -1,11 +1,13 @@
|
||||
name: Legacy App Testing
|
||||
name: Tests (Legacy App)
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0,12 * * *"
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
concurrency: ci-${{ github.ref }}
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}-tests-legacy
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test-submodules:
|
||||
|
||||
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -10,7 +10,9 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency: ci-${{ github.ref }}
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}-tests
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test-submodules:
|
||||
@ -237,8 +239,6 @@ jobs:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- uses: technote-space/get-diff-action@v6.1.0
|
||||
with:
|
||||
PATTERNS: |
|
||||
|
||||
@ -6,7 +6,6 @@ use (
|
||||
./client/v2
|
||||
./core
|
||||
./cosmovisor
|
||||
./db
|
||||
./depinject
|
||||
./errors
|
||||
./math
|
||||
|
||||
Loading…
Reference in New Issue
Block a user