commander: derive port and signet magic bytes automagically #2155
Workflow file for this run
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| PYTHON_VERSION: "3.12" | |
| STERN_VERSION: "1.30.0" | |
| jobs: | |
| ruff: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "0.6.11" | |
| enable-cache: true | |
| - name: Lint | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "check --fix" | |
| - name: Format | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "format --check --diff" | |
| test: | |
| needs: [ruff] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| test: | |
| - bitcoin_rpc_args_test.py | |
| - conf_test.py | |
| - dag_connection_test.py | |
| - graph_test.py | |
| - logging_test.py | |
| - ln_basic_test.py | |
| - ln_test.py | |
| - onion_test.py | |
| - plugin_test.py | |
| - rpc_test.py | |
| - services_test.py | |
| - signet_test.py | |
| - scenarios_test.py | |
| - namespace_admin_test.py | |
| - wargames_test.py | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: azure/[email protected] | |
| - name: start minikube | |
| uses: medyagh/setup-minikube@latest | |
| id: minikube | |
| with: | |
| cpus: max | |
| memory: 4000m | |
| - name: Start minikube's loadbalancer tunnel | |
| run: minikube tunnel &> /dev/null & | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install project | |
| run: uv sync --all-extras --dev | |
| - name: Run tests | |
| run: | | |
| source .venv/bin/activate | |
| ./test/${{matrix.test}} | |
| - name: Collect Kubernetes logs | |
| if: always() | |
| run: | | |
| echo "Installing stern..." | |
| curl -Lo stern.tar.gz https://github.com/stern/stern/releases/download/v${STERN_VERSION}/stern_${STERN_VERSION}_linux_amd64.tar.gz | |
| tar zxvf stern.tar.gz | |
| chmod +x stern | |
| sudo mv stern /usr/local/bin/ | |
| # Run script | |
| curl -O https://raw.githubusercontent.com/bitcoin-dev-project/warnet/main/resources/scripts/k8s-log-collector.sh | |
| chmod +x k8s-log-collector.sh | |
| ./k8s-log-collector.sh default | |
| - name: Upload log artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kubernetes-logs-${{ matrix.test }} | |
| path: ./k8s-logs | |
| retention-days: 5 |