Skip to content

Commit

Permalink
ci: update workflows to support latest (#1638)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanchristo authored Nov 24, 2022
1 parent e1d8098 commit 7261720
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ coverage:
ecocredit:
paths:
- "x/ecocredit/"
intertx:
paths:
- "x/intertx/"
changes: false

comment:
Expand Down
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ updates:
interval: daily
open-pull-requests-limit: 5

- package-ecosystem: "gomod"
directory: "/x/intertx"
schedule:
interval: daily
open-pull-requests-limit: 5

- package-ecosystem: "npm"
directory: "/docs"
schedule:
Expand Down
8 changes: 8 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ pull_request_rules:
backport:
branches:
- release/v4.1.x
- name: backport patches to v5.0.x branch
conditions:
- base=main
- label=backport/v5.0.x
actions:
backport:
branches:
- release/v5.0.x
14 changes: 13 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
pull-requests: read # for technote-space/get-diff-action to get git reference
strategy:
matrix:
module: ["app", "types", "x/data", "x/ecocredit"]
module: ["app", "types", "x/data", "x/ecocredit", "x/intertx"]
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
Expand Down Expand Up @@ -64,6 +64,14 @@ jobs:
x/ecocredit/go.mod
x/ecocredit/go.sum
if: matrix.module == 'x/ecocredit'
- uses: technote-space/get-diff-action@v6
id: git-diff-intertx
with:
PATTERNS: |
x/intertx/**/**.go
x/intertx/go.mod
x/intertx/go.sum
if: matrix.module == 'x/intertx'
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
Expand All @@ -84,6 +92,10 @@ jobs:
with:
working-directory: "x/ecocredit"
if: steps.git-diff-ecocredit.outputs.diff
- uses: golangci/golangci-lint-action@v3
with:
working-directory: "x/intertx"
if: steps.git-diff-intertx.outputs.diff

buf-lint:
runs-on: ubuntu-latest
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
pull-requests: read # for technote-space/get-diff-action to get git reference
strategy:
matrix:
module: ["app", "types", "x/data", "x/ecocredit"]
module: ["app", "types", "x/data", "x/ecocredit", "x/intertx"]
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
Expand Down Expand Up @@ -57,6 +57,10 @@ jobs:
if: |
(env.GIT_DIFF && matrix.module == 'x/ecocredit') ||
github.ref == 'refs/heads/main'
- run: make test-x-intertx
if: |
(env.GIT_DIFF && matrix.module == 'x/intertx') ||
github.ref == 'refs/heads/main'
- uses: actions/upload-artifact@v3
with:
name: coverage-app
Expand Down Expand Up @@ -85,6 +89,13 @@ jobs:
if: |
(env.GIT_DIFF && matrix.module == 'x/ecocredit') ||
github.ref == 'refs/heads/main'
- uses: actions/upload-artifact@v3
with:
name: coverage-x-intertx
path: coverage-x-intertx.out
if: |
(env.GIT_DIFF && matrix.module == 'x/intertx') ||
github.ref == 'refs/heads/main'
integration:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -139,6 +150,10 @@ jobs:
with:
name: coverage-x-ecocredit
if: env.GIT_DIFF || github.ref == 'refs/heads/main'
- uses: actions/download-artifact@v3
with:
name: coverage-x-intertx
if: env.GIT_DIFF || github.ref == 'refs/heads/main'
- uses: actions/download-artifact@v3
with:
name: coverage-integration
Expand Down
9 changes: 7 additions & 2 deletions make/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ test-x-ecocredit:
@cd x/ecocredit && go test ./... \
-coverprofile=${CURRENT_DIR}/coverage-x-ecocredit.out -covermode=atomic

test-x-intertx:
@echo "Testing Module x/intertx"
@cd x/intertx && go test ./... \
-coverprofile=${CURRENT_DIR}/coverage-x-intertx.out -covermode=atomic

test-integration:
@echo "Testing Integration"
@go test ./app/testsuite/... \
Expand All @@ -49,5 +54,5 @@ test-clean:
@find . -name 'coverage.txt' -delete
@find . -name 'coverage*.out' -delete

.PHONY: test test-all test-app test-types test-x-data \
test-x-ecocredit test-integration test-coverage test-clean
.PHONY: test test-all test-app test-types test-x-data test-x-ecocredit \
test-x-intertx test-integration test-coverage test-clean
7 changes: 5 additions & 2 deletions scripts/testnet_from_export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ tokens=$(echo "${amount}${bond_denom}" | tr -d '"')
# tokens2 is token amount x2 providing a starting balance with amount
tokens2=$(echo "$(( "$amount" + "$amount" ))${bond_denom}" | tr -d '"')

# gas_price is the minimum gas price for the node
gas_price=$(echo "0${bond_denom}" | tr -d '"')

# build binary
make build

Expand All @@ -78,7 +81,7 @@ make build
sed -i "s|\"stake\"|$bond_denom|g" "$node_genesis"

# start node and deliver genesis transaction
./build/regen start --home "$home" --halt-height 1 && wait $!
./build/regen start --home "$home" --halt-height 1 --minimum-gas-prices "$gas_price" && wait $!

# create temporary directory
mkdir -p "$tmp_dir"
Expand Down Expand Up @@ -227,4 +230,4 @@ rm -rf $tmp_dir
cat <<< $(jq '.app_state.gov.voting_params.voting_period = "20s"' "$node_genesis") > "$node_genesis"

# start node
./build/regen start --home "$home" --fast_sync=false
./build/regen start --home "$home" --fast_sync=false --minimum-gas-prices "$gas_price"

0 comments on commit 7261720

Please sign in to comment.