Skip to content

Commit

Permalink
Merge branch 'develop' into share-deduct-fee
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang authored Mar 12, 2024
2 parents d2ae56a + b3083d7 commit 066ba68
Show file tree
Hide file tree
Showing 17 changed files with 60 additions and 62 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build
on:
pull_request:
branches:
- main
- develop

jobs:
cleanup-runs:
Expand All @@ -11,7 +11,7 @@ jobs:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/develop'"

build:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [main]
branches: [develop]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
branches: [develop]
schedule:
- cron: '37 21 * * 4'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy Contract
on:
pull_request:
branches:
- main
- develop

jobs:
cleanup-runs:
Expand All @@ -11,7 +11,7 @@ jobs:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/develop'"

deploy:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
push:
branches:
- main
- develop

jobs:
triage:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
push:
branches:
- main
- develop
jobs:
golangci:
name: Run golangci-lint
Expand Down Expand Up @@ -58,9 +58,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
- uses: cachix/cachix-action@v14
with:
name: ethermint
name: crypto-ethermint
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
Expand All @@ -74,9 +74,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
- uses: cachix/cachix-action@v14
with:
name: ethermint
name: crypto-ethermint
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/markdown-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- '**.md'
push:
branches:
- main
- develop
paths:
- '**.md'

Expand All @@ -24,6 +24,6 @@ jobs:
folder-path: "docs"
check-modified-files-only: "yes"
use-quiet-mode: "yes"
base-branch: "main"
base-branch: "develop"
config-file: "mlc_config.json"
if: env.GIT_DIFF
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
push:
branches:
- main
- develop

jobs:
Gosec:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request: {}
push:
branches:
- main
- develop
paths:
- .github/workflows/semgrep.yml
schedule:
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/super-linter.yml

This file was deleted.

15 changes: 10 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
push:
branches:
- main
- develop
- release/**

jobs:
Expand Down Expand Up @@ -86,16 +86,21 @@ jobs:
integration_tests:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
tests: [unmarked, upgrade, filter]
env:
TESTS_TO_RUN: ${{ matrix.tests }}
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-22.11
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
- uses: cachix/cachix-action@v14
with:
name: ethermint
name: crypto-ethermint
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- uses: technote-space/get-diff-action@v6.1.2
with:
Expand Down Expand Up @@ -128,9 +133,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
- uses: cachix/cachix-action@v14
with:
name: ethermint
name: crypto-ethermint
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: 'instantiate integration test env'
run: nix-store -r $(nix-instantiate tests/integration_tests/shell.nix)
Expand Down
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pull_request_rules:
actions:
backport:
branches:
- main
- develop
- name: backport patches to v0.20.x branch
conditions:
- base=main
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@ test-import:
test-rpc:
./scripts/integration-test-all.sh -t "rpc" -q 1 -z 1 -s 5 -m "rpc" -r "true"

# possible values:
# - all: run all integration tests
# - unmarked: run integration tests that are not marked
# - marker1,marker2: markers separated by comma, run integration tests that are marked with any of the markers
TESTS_TO_RUN ?= all

run-integration-tests:
@nix-shell ./tests/integration_tests/shell.nix --run ./scripts/run-integration-tests.sh

Expand Down
11 changes: 10 additions & 1 deletion scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@ cd ../tests/integration_tests/hardhat
HUSKY_SKIP_INSTALL=1 npm install
npm run typechain
cd ..
pytest -vv -s

TESTS_TO_RUN="${TESTS_TO_RUN:-all}"

if [[ "$TESTS_TO_RUN" == "all" ]]; then
echo "run all tests"
pytest -vv -s
else
echo "run tests matching $TESTS_TO_RUN"
pytest -vv -s -m "$TESTS_TO_RUN"
fi
12 changes: 12 additions & 0 deletions tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
from .network import setup_ethermint, setup_geth


def pytest_configure(config):
config.addinivalue_line("markers", "unmarked: fallback mark for unmarked tests")
config.addinivalue_line("markers", "upgrade: upgrade tests")
config.addinivalue_line("markers", "filter: filter tests")


def pytest_collection_modifyitems(items, config):
for item in items:
if not any(item.iter_markers()):
item.add_marker("unmarked")


@pytest.fixture(scope="session")
def ethermint(tmp_path_factory):
path = tmp_path_factory.mktemp("ethermint")
Expand Down
2 changes: 2 additions & 0 deletions tests/integration_tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
w3_wait_for_new_blocks,
)

pytestmark = pytest.mark.filter


@pytest.fixture(scope="module")
def custom_ethermint(tmp_path_factory):
Expand Down
2 changes: 2 additions & 0 deletions tests/integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
wait_for_port,
)

pytestmark = pytest.mark.upgrade


def init_cosmovisor(home):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: contracts
on:
push:
branches:
- main
- develop
pull_request:
branches:
- '*'
Expand Down

0 comments on commit 066ba68

Please sign in to comment.