Skip to content

Conversation

Copy link

Copilot AI commented Dec 11, 2025

The existing C/C++ workflow runs ./configure on all pushes, failing for Python-only changes. This adds a dedicated Python workflow with path filtering to prevent cross-triggering.

Changes

  • New workflow: .github/workflows/python-package.yml
    • Triggers only on trinity_wallet_py/** changes
    • Python 3.11 on ubuntu-latest
    • Pip cache with requirements.txt hash key
    • Runs pytest on test_wallet.py

Behavior

Path filter ensures:

  • Python changes → Python CI only
  • C/C++ changes → C/C++ CI only (unmodified)
  • No cross-triggering between ecosystems

References

Original prompt

Add a new GitHub Actions workflow that runs CI for the Python package trinity_wallet_py and restricts triggers so it only runs for changes under trinity_wallet_py/**. This will provide CI for the newly added Python package and avoid triggering the existing C/C++ workflow (which runs ./configure) for Python-only changes. The failing job to reference: run 20143292221, job 57817586867; the C/C++ workflow path: .github/workflows/c-cpp.yml at ref a0c716d.

Requirements:

  • Create a branch named: ci/add-python-workflow
  • Add file at .github/workflows/python-package.yml with the exact YAML content below
  • Commit message: "ci: add Python CI workflow for trinity_wallet_py"
  • Open a pull request targeting master with title: "ci: add Python CI workflow for trinity_wallet_py" and include a description referencing the failing job and the c-cpp workflow ref above
  • Merge the PR after checks pass and delete the branch
  • Do NOT modify any other files in this PR

File contents to add (exact, verbatim):

name: Python package CI

on:
push:
branches: [ "master" ]
paths:
- "trinity_wallet_py/"
pull_request:
branches: [ "master" ]
paths:
- "trinity_wallet_py/
"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('trinity_wallet_py/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f trinity_wallet_py/requirements.txt ]; then
pip install -r trinity_wallet_py/requirements.txt
fi
- name: Run tests
run: |
python -m pip install pytest || true
pytest -q trinity_wallet_py/test_wallet.py

Rationale:

  • The repository contains trinity_wallet_py/requirements.txt and trinity_wallet_py/test_wallet.py; use these in the workflow to install dependencies and run tests.
  • The existing C/C++ workflow (.github/workflows/c-cpp.yml at ref a0c716d) invokes ./configure and fails for Python-only changes (see failing job run 20143292221, job 57817586867). This change restricts CI for Python changes to this new workflow and prevents unnecessary failures.

Please create the branch, add the file, open the PR, wait for checks to pass, merge into master, and delete the branch. Merge strategy: merge commit.

This pull request was created as a result of the following prompt from Copilot chat.

Add a new GitHub Actions workflow that runs CI for the Python package trinity_wallet_py and restricts triggers so it only runs for changes under trinity_wallet_py/**. This will provide CI for the newly added Python package and avoid triggering the existing C/C++ workflow (which runs ./configure) for Python-only changes. The failing job to reference: run 20143292221, job 57817586867; the C/C++ workflow path: .github/workflows/c-cpp.yml at ref a0c716d.

Requirements:

  • Create a branch named: ci/add-python-workflow
  • Add file at .github/workflows/python-package.yml with the exact YAML content below
  • Commit message: "ci: add Python CI workflow for trinity_wallet_py"
  • Open a pull request targeting master with title: "ci: add Python CI workflow for trinity_wallet_py" and include a description referencing the failing job and the c-cpp workflow ref above
  • Merge the PR after checks pass and delete the branch
  • Do NOT modify any other files in this PR

File contents to add (exact, verbatim):

name: Python package CI

on:
push:
branches: [ "master" ]
paths:
- "trinity_wallet_py/"
pull_request:
branches: [ "master" ]
paths:
- "trinity_wallet_py/
"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('trinity_wallet_py/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f trinity_wallet_py/requirements.txt ]; then
pip install -r trinity_wallet_py/requirements.txt
fi
- name: Run tests
run: |
python -m pip install pytest || true
pytest -q trinity_wallet_py/test_wallet.py

Rationale:

  • The repository contains trinity_wallet_py/requirements.txt and trinity_wallet_py/test_wallet.py; use these in the workflow to install dependencies and run tests.
  • The existing C/C++ workflow (.github/workflows/c-cpp.yml at ref a0c716d) invokes ./configure and fails for Python-only changes (see failing job run 20143292221, job 57817586867). This change restricts CI for Python changes to this new workflow and prevents unnecessary failures.

Please create the branch, add the file, open the PR, wait for checks to pass, merge into master, and delete the branch. Merge strategy: merge commit.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: 5mil <4460242+5mil@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Python CI workflow for trinity_wallet_py ci: add Python CI workflow for trinity_wallet_py Dec 11, 2025
Copilot AI requested a review from 5mil December 11, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants