Skip to content

feat: add tox args support for custom CLI flags #1092

@rnetser

Description

@rnetser

Problem

Currently the tox configuration only maps branches to test environments:

tox:
  main: all
  dev: testenv1,testenv2

There's no way for users to pass custom CLI flags to tox (e.g., -p for parallel, -x for fail-fast, --override for config overrides).

Proposed Solution

Add a tox-args configuration key that accepts a string of CLI flags to pass to tox:

tox:
  main: all
tox-args: "-p -x"

These args will be appended to the tox command built in runner_handler.py.

Requirements

  • Add tox-args to config schema (webhook_server/config/schema.yaml)
  • Read tox-args in github_api.py _repo_data_from_config()
  • Pass args to tox command in runner_handler.py run_tox()
  • Add tests for new functionality
  • Update example config

Files to Modify

  • webhook_server/config/schema.yaml
  • webhook_server/libs/github_api.py
  • webhook_server/libs/handlers/runner_handler.py
  • webhook_server/tests/ (new or existing test files)
  • examples/.github-webhook-server.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions