Skip to content

Commit

Permalink
Merge branch 'main' into ty/1110-all_credit_holders
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler authored and tyler committed Aug 30, 2022
2 parents fb7d1f3 + b86c330 commit 2561076
Show file tree
Hide file tree
Showing 78 changed files with 2,027 additions and 703 deletions.
1 change: 0 additions & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ comment:
require_changes: true

ignore:
- "mocks"
- "**/mocks"
- "**/simulation"
- "**/*.cosmos_orm.go"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ on:
# Runs "at 1am every day"
- cron: "0 0 * * *"

permissions:
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- main
- release/v*

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint PR

# **What it does**: Runs a linter on pull request titles that
# ensures titles adhere to semantic commits.
#
# **Why we have it**: Ensures all pull requests squashed and
# merged are conventional according to semantic commits.
#
# **What does it impact**: Code quality.

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
contents: read

jobs:
semantic:
runs-on: ubuntu-latest
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
steps:
- uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ on:
- main
- release/v*

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
golangci:
runs-on: ubuntu-latest
permissions:
pull-requests: read # for technote-space/get-diff-action to get git reference
strategy:
matrix:
module: ["app", "types", "x/data", "x/ecocredit"]
Expand Down Expand Up @@ -82,6 +87,8 @@ jobs:

buf-lint:
runs-on: ubuntu-latest
permissions:
pull-requests: read # for technote-space/get-diff-action to get git reference
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
Expand All @@ -98,6 +105,8 @@ jobs:

protolint:
runs-on: ubuntu-latest
permissions:
pull-requests: read # for technote-space/get-diff-action to get git reference
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/proto-registry.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Proto-Registry
name: Proto Registry

# **What it does**: Pushes proto files to buf schema registry when
# proto files have been modified (https://buf.build/regen/regen-ledger).
Expand All @@ -15,6 +15,9 @@ on:
paths:
- 'proto/**'

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ on:
paths:
- 'proto/**'

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ on:
tags:
- v*

permissions:
contents: read

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # for goreleaser/goreleaser-action to create a GitHub release
steps:
- uses: actions/checkout@v3
with:
Expand Down
35 changes: 27 additions & 8 deletions .github/workflows/sims-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Sims Nightly

# **What it does**: Runs simulations (after-import, fast) on a
# set schedule.
# **What it does**: Runs application simulations with multiple seeds
# and increased block numbers on a set schedule.
#
# **Why we have it**: Ensures the application is production ready.
#
Expand All @@ -12,23 +12,42 @@ on:
# Runs "at 1am every day"
- cron: "0 0 * * *"

permissions:
contents: read

jobs:
sim-after-import:
app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- run: NUM_BLOCKS=500 make sim-app-multi-seed

import-export:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- run: NUM_BLOCKS=500 make sim-import-export-multi-seed

after-import:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Run sim-after-import
run: make sim-regen-after-import
- run: NUM_BLOCKS=500 make sim-after-import-multi-seed

sim-fast:
determinism:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Run sim-fast
run: make sim-regen-fast
- run: NUM_BLOCKS=100 make sim-determinism-multi-seed
62 changes: 53 additions & 9 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Sims

# **What it does**: Runs simulations (nondeterminism, import-export)
# when go files have been modified.
# **What it does**: Runs application simulations when go files
# have been modified.
#
# **Why we have it**: Ensures the application is production ready.
# **Why we have it**: Ensures simulations are functioning for
# more thorough nightly runs.
#
# **What does it impact**: Application stability.

Expand All @@ -14,13 +15,18 @@ on:
- main
- release/v*

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
sim-nondeterminism:
app:
runs-on: ubuntu-latest
permissions:
pull-requests: read # for technote-space/get-diff-action to get git reference
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
Expand All @@ -33,12 +39,51 @@ jobs:
with:
go-version-file: 'go.mod'
if: env.GIT_DIFF
- name: Run sim-nondeterminism
run: make sim-regen-nondeterminism
- run: NUM_BLOCKS=100 make sim-app
if: env.GIT_DIFF

import-export:
runs-on: ubuntu-latest
permissions:
pull-requests: read # for technote-space/get-diff-action to get git reference
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
if: env.GIT_DIFF
- run: NUM_BLOCKS=100 make sim-import-export
if: env.GIT_DIFF

after-import:
runs-on: ubuntu-latest
permissions:
pull-requests: read # for technote-space/get-diff-action to get git reference
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
if: env.GIT_DIFF
- run: NUM_BLOCKS=100 make sim-after-import
if: env.GIT_DIFF

sim-import-export:
determinism:
runs-on: ubuntu-latest
permissions:
pull-requests: read # for technote-space/get-diff-action to get git reference
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
Expand All @@ -51,6 +96,5 @@ jobs:
with:
go-version-file: 'go.mod'
if: env.GIT_DIFF
- name: Run sim-import-export
run: make sim-regen-import-export
- run: NUM_BLOCKS=20 make sim-determinism
if: env.GIT_DIFF
66 changes: 0 additions & 66 deletions .github/workflows/test.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/tests-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tests Nightly

# **What it does**: Runs liveness test on a set schedule.
#
# **Why we have it**: Ensures the application is production ready.
#
# **What does it impact**: Application stability.

on:
schedule:
# Runs "at 1am every day"
- cron: "0 0 * * *"

jobs:
liveness:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- run: make localnet-start
- run: ./scripts/test_liveness.sh 100 5 100 10 localhost
Loading

0 comments on commit 2561076

Please sign in to comment.