Skip to content

Commit

Permalink
Edit wf file
Browse files Browse the repository at this point in the history
  • Loading branch information
boogeroccam committed Nov 16, 2024
1 parent 019794b commit bb91a44
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 36 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download binary artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -59,11 +59,22 @@ jobs:
version: "latest"

- name: Run tests
run: make test
run: |
make test
if [ -f "tests/galacli/report.md" ]; then
echo "<details><summary>Test Report</summary>" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
cat tests/galacli/report.md >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "</details>" >> $GITHUB_STEP_SUMMARY
fi
- name: Test status check
if: failure()
run: exit 1
- name: Render the report to the PR when tests fail
uses: marocchino/sticky-pull-request-comment@v2
with:
header: test-report
recreate: true
path: tests/galacli/report.md

permissions:
pull-requests: write
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ build-alpine:
@GOOS=linux CGO_ENABLED=1 go build -ldflags="-w -s" -o $(BUILDDIR)/$(GALACTICA_BINARY) ./cmd/galacticad

localnet-build:
@make build
@$(MAKE) build
@echo "Build docker image for localnet..."
@./localnet/build-docker.sh

Expand Down
25 changes: 17 additions & 8 deletions tests/galacli/Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
uname=$(shell uname -s)
is_darwin :=$(filter Darwin,$(uname))
all: ## run tests
all: $(if $(is_darwin),network,) clean start_test

all: $(if $(is_darwin),network,) clean start
help: ## Show this help
@printf "\033[33m%s:\033[0m\n" 'Available commands'
@awk 'BEGIN {FS = ":.*?## "} /^[[:alpha:][:punct:]]+:.*?## / {printf " \033[32m%-18s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

clean:
rm -rf node0* .pytest_cache __pycache__

.venv/bin/python:
.venv/bin/pytest .venv/bin/python:
uv venv
uv sync

start: ## just run galacli.py for debugging purpose
start: .venv/bin/python
pytest -v .
# .venv/bin/python galacli.py
ps:
.venv/bin/python galacli.py

start_test: .venv/bin/pytest ## start tests
.venv/bin/pytest -v .

ps: ## show running galacticad processes
-@ps | grep galacticad | grep -v 'grep'

terminate: ps
terminate: ps ## terminate running galacticad processes
ps | grep galacticad | grep -v 'grep' | awk '{print $$1}' | xargs -n1 kill -15
kill: ps

kill: ps ## kill running galacticad processes
ps | grep galacticad | grep -v 'grep' | awk '{print $$1}' | xargs -n1 sudo kill -9

ifeq ($(uname),Darwin)
network: /tmp/127.0.0.2 /tmp/127.0.0.3 /tmp/127.0.0.4
network: /tmp/127.0.0.2 /tmp/127.0.0.3 /tmp/127.0.0.4 ## assume you are using macos for development
/tmp/127.0.0.%:
sudo ifconfig lo0 alias $(shell basename $@) up && touch $@
endif
22 changes: 1 addition & 21 deletions tests/galacli/galacli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@
import time
import socket
import re


# import os
import sys
from pathlib import Path
import tempfile
import requests
import toml
from pprint import pprint
import urllib.parse

DEBUG = True
Expand Down Expand Up @@ -561,7 +557,7 @@ def unsaferesetall(self):

def query_base_fee(self, **kwargs):
default_kwargs = {"home": self.data_dir}

## evmos tests comment
# TODO: is this assumption correct? Having the base fee turned off has caused some test failures
# because it was returning `null` and not an `int(...)` -> we'll return 0 here.
params = json.loads(
Expand Down Expand Up @@ -936,22 +932,6 @@ def combine_seeds(self) -> Dict:
def configure_network(self):
"""
### func for configuring gala network
- [X] Init first node to get blank genesis.json
- [X] Edit config files via first node to set common config
- [X] Configure genesis to needed state
- [X] edit genesis.json
- [X] add some gentx
- [X] collect gentx
- [X] validate genesis
- [ ] Get tendermint node-id of each node
- [X] Put node folder
- [X] configure node
- [X] put key into node
- [X] put genesis.json to node config
- [ ] get tendermint node-id
- [ ] Edit individual configs to set some parameters throgh network
- [ ] Persistent peers
"""

self.command_node.init_node(
Expand Down
2 changes: 1 addition & 1 deletion tests/galacli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies = [
[tool.pytest.ini_options]
md_report_output = "report.md"
md_report = true
md_report_verbose = 0
md_report_verbose = 1
md_report_color = "never"

# asyncio_mode = "auto"
Expand Down

0 comments on commit bb91a44

Please sign in to comment.