Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,18 @@ jobs:
- run: pip install dist/*.whl
- run: xpyd --help && xpyd --version
- run: pip install pytest pytest-asyncio aiohttp requests xpyd-sim && python -m pytest tests/integration/test_cli_and_discovery.py -v --tb=short
benchmark:
integration-trigger:
needs: [test]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: {python-version: "3.12"}
- run: pip install -e ".[dev]"
- run: python -m pytest tests/stress/ -v --tb=short -m benchmark -s

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

secrets.GITHUB_TOKEN is scoped to the current repository only. It cannot trigger repository_dispatch on a different repo (xPyD-hub/xPyD-integration). This step will fail with a 403/404 at runtime.

You need a PAT or a fine-grained token (stored as a separate repo secret, e.g. secrets.INTEGRATION_DISPATCH_TOKEN) that has contents: write or dispatch permission on the target repo.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5caff22.

- name: Trigger integration tests
# Requires a PAT (INTEGRATION_DISPATCH_TOKEN) with repo scope
# and write access to xPyD-hub/xPyD-integration for cross-repo dispatch.
env:
GH_TOKEN: \${{ secrets.INTEGRATION_DISPATCH_TOKEN }}
run: |
gh api repos/xPyD-hub/xPyD-integration/dispatches \
-f event_type=dependency-updated \
-f "client_payload[repo]=xPyD-proxy" \
-f "client_payload[sha]=\${{ github.sha }}"
Loading
Loading