behave-runner 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- behave_runner-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +66 -0
- behave_runner-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- behave_runner-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +24 -0
- behave_runner-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +27 -0
- behave_runner-0.1.0/.github/workflows/ci.yml +85 -0
- behave_runner-0.1.0/.github/workflows/docs.yml +63 -0
- behave_runner-0.1.0/.github/workflows/release.yml +94 -0
- behave_runner-0.1.0/.gitignore +34 -0
- behave_runner-0.1.0/.pre-commit-config.yaml +23 -0
- behave_runner-0.1.0/CHANGELOG.md +15 -0
- behave_runner-0.1.0/CODE_OF_CONDUCT.md +132 -0
- behave_runner-0.1.0/CONTRIBUTING.md +58 -0
- behave_runner-0.1.0/LICENSE +21 -0
- behave_runner-0.1.0/Makefile +65 -0
- behave_runner-0.1.0/PKG-INFO +178 -0
- behave_runner-0.1.0/README.md +83 -0
- behave_runner-0.1.0/SECURITY.md +16 -0
- behave_runner-0.1.0/SUPPORT.md +17 -0
- behave_runner-0.1.0/behave_runner/__init__.py +5 -0
- behave_runner-0.1.0/behave_runner/__main__.py +14 -0
- behave_runner-0.1.0/behave_runner/cli/__init__.py +0 -0
- behave_runner-0.1.0/behave_runner/cli/app.py +69 -0
- behave_runner-0.1.0/behave_runner/commands/__init__.py +0 -0
- behave_runner-0.1.0/behave_runner/commands/config_cmd.py +173 -0
- behave_runner-0.1.0/behave_runner/commands/doctor.py +30 -0
- behave_runner-0.1.0/behave_runner/commands/format_cmd.py +41 -0
- behave_runner-0.1.0/behave_runner/commands/generate.py +53 -0
- behave_runner-0.1.0/behave_runner/commands/impact.py +50 -0
- behave_runner-0.1.0/behave_runner/commands/init.py +37 -0
- behave_runner-0.1.0/behave_runner/commands/lint.py +30 -0
- behave_runner-0.1.0/behave_runner/commands/list_cmd.py +76 -0
- behave_runner-0.1.0/behave_runner/commands/open_cmd.py +65 -0
- behave_runner-0.1.0/behave_runner/commands/record.py +83 -0
- behave_runner-0.1.0/behave_runner/commands/report.py +90 -0
- behave_runner-0.1.0/behave_runner/commands/run.py +131 -0
- behave_runner-0.1.0/behave_runner/commands/select.py +110 -0
- behave_runner-0.1.0/behave_runner/commands/steps.py +59 -0
- behave_runner-0.1.0/behave_runner/commands/trace.py +50 -0
- behave_runner-0.1.0/behave_runner/commands/watch.py +82 -0
- behave_runner-0.1.0/behave_runner/core/__init__.py +0 -0
- behave_runner-0.1.0/behave_runner/core/config.py +39 -0
- behave_runner-0.1.0/behave_runner/core/deps.py +29 -0
- behave_runner-0.1.0/behave_runner/core/orchestrator.py +260 -0
- behave_runner-0.1.0/behave_runner/core/output.py +34 -0
- behave_runner-0.1.0/behave_runner/core/watcher.py +64 -0
- behave_runner-0.1.0/behave_runner/exceptions.py +23 -0
- behave_runner-0.1.0/behave_runner/py.typed +0 -0
- behave_runner-0.1.0/behave_runner/utils.py +26 -0
- behave_runner-0.1.0/docs/architecture.md +123 -0
- behave_runner-0.1.0/docs/changelog.md +19 -0
- behave_runner-0.1.0/docs/ci-cd.md +130 -0
- behave_runner-0.1.0/docs/cli.md +367 -0
- behave_runner-0.1.0/docs/commands/config.md +62 -0
- behave_runner-0.1.0/docs/commands/doctor.md +40 -0
- behave_runner-0.1.0/docs/commands/format.md +45 -0
- behave_runner-0.1.0/docs/commands/generate.md +59 -0
- behave_runner-0.1.0/docs/commands/impact.md +47 -0
- behave_runner-0.1.0/docs/commands/init.md +43 -0
- behave_runner-0.1.0/docs/commands/lint.md +39 -0
- behave_runner-0.1.0/docs/commands/list.md +40 -0
- behave_runner-0.1.0/docs/commands/open.md +43 -0
- behave_runner-0.1.0/docs/commands/record.md +50 -0
- behave_runner-0.1.0/docs/commands/report.md +66 -0
- behave_runner-0.1.0/docs/commands/run.md +74 -0
- behave_runner-0.1.0/docs/commands/select.md +42 -0
- behave_runner-0.1.0/docs/commands/steps.md +67 -0
- behave_runner-0.1.0/docs/commands/trace.md +54 -0
- behave_runner-0.1.0/docs/commands/watch.md +46 -0
- behave_runner-0.1.0/docs/configuration.md +160 -0
- behave_runner-0.1.0/docs/contributing.md +23 -0
- behave_runner-0.1.0/docs/ecosystem.md +54 -0
- behave_runner-0.1.0/docs/faq.md +108 -0
- behave_runner-0.1.0/docs/index.md +70 -0
- behave_runner-0.1.0/docs/installation.md +92 -0
- behave_runner-0.1.0/docs/python-api.md +55 -0
- behave_runner-0.1.0/docs/quickstart.md +91 -0
- behave_runner-0.1.0/mkdocs.yml +97 -0
- behave_runner-0.1.0/pyproject.toml +145 -0
- behave_runner-0.1.0/tests/__init__.py +0 -0
- behave_runner-0.1.0/tests/e2e/__init__.py +0 -0
- behave_runner-0.1.0/tests/e2e/conftest.py +3 -0
- behave_runner-0.1.0/tests/e2e/test_pokemon.py +97 -0
- behave_runner-0.1.0/tests/e2e/test_pokemon_api/environment.py +21 -0
- behave_runner-0.1.0/tests/e2e/test_pokemon_api/features/pokemon.feature +12 -0
- behave_runner-0.1.0/tests/e2e/test_pokemon_api/features/types.feature +7 -0
- behave_runner-0.1.0/tests/e2e/test_pokemon_api/steps/pokemon_steps.py +37 -0
- behave_runner-0.1.0/tests/e2e/test_pokemon_api/steps/types_steps.py +29 -0
- behave_runner-0.1.0/tests/e2e/test_saucedemo/environment.py +33 -0
- behave_runner-0.1.0/tests/e2e/test_saucedemo/features/cart.feature +13 -0
- behave_runner-0.1.0/tests/e2e/test_saucedemo/features/checkout.feature +10 -0
- behave_runner-0.1.0/tests/e2e/test_saucedemo/features/login.feature +17 -0
- behave_runner-0.1.0/tests/e2e/test_saucedemo/steps/cart_steps.py +68 -0
- behave_runner-0.1.0/tests/e2e/test_saucedemo/steps/checkout_steps.py +38 -0
- behave_runner-0.1.0/tests/e2e/test_saucedemo/steps/login_steps.py +56 -0
- behave_runner-0.1.0/tests/e2e/test_saucedemo.py +105 -0
- behave_runner-0.1.0/tests/fixtures/failing/environment.py +1 -0
- behave_runner-0.1.0/tests/fixtures/failing/features/failing.feature +6 -0
- behave_runner-0.1.0/tests/fixtures/failing/steps/steps.py +18 -0
- behave_runner-0.1.0/tests/fixtures/minimal/environment.py +1 -0
- behave_runner-0.1.0/tests/fixtures/minimal/features/login.feature +6 -0
- behave_runner-0.1.0/tests/fixtures/minimal/steps/steps.py +18 -0
- behave_runner-0.1.0/tests/fixtures/parallel/environment.py +1 -0
- behave_runner-0.1.0/tests/fixtures/parallel/features/parallel.feature +101 -0
- behave_runner-0.1.0/tests/fixtures/parallel/steps/steps.py +18 -0
- behave_runner-0.1.0/tests/fixtures/priority/environment.py +1 -0
- behave_runner-0.1.0/tests/fixtures/priority/features/priority.feature +16 -0
- behave_runner-0.1.0/tests/fixtures/priority/steps/steps.py +18 -0
- behave_runner-0.1.0/tests/integration/__init__.py +0 -0
- behave_runner-0.1.0/tests/integration/test_config_cmd.py +97 -0
- behave_runner-0.1.0/tests/integration/test_doctor.py +33 -0
- behave_runner-0.1.0/tests/integration/test_format.py +33 -0
- behave_runner-0.1.0/tests/integration/test_generate.py +45 -0
- behave_runner-0.1.0/tests/integration/test_impact.py +33 -0
- behave_runner-0.1.0/tests/integration/test_init.py +36 -0
- behave_runner-0.1.0/tests/integration/test_lint.py +33 -0
- behave_runner-0.1.0/tests/integration/test_list.py +58 -0
- behave_runner-0.1.0/tests/integration/test_open.py +51 -0
- behave_runner-0.1.0/tests/integration/test_record.py +35 -0
- behave_runner-0.1.0/tests/integration/test_report.py +72 -0
- behave_runner-0.1.0/tests/integration/test_run.py +201 -0
- behave_runner-0.1.0/tests/integration/test_select.py +83 -0
- behave_runner-0.1.0/tests/integration/test_steps.py +33 -0
- behave_runner-0.1.0/tests/integration/test_trace.py +41 -0
- behave_runner-0.1.0/tests/integration/test_watch.py +30 -0
- behave_runner-0.1.0/tests/unit/__init__.py +0 -0
- behave_runner-0.1.0/tests/unit/test_cli.py +27 -0
- behave_runner-0.1.0/tests/unit/test_config.py +57 -0
- behave_runner-0.1.0/tests/unit/test_deps.py +21 -0
- behave_runner-0.1.0/tests/unit/test_orchestrator.py +88 -0
- behave_runner-0.1.0/tests/unit/test_output.py +56 -0
- behave_runner-0.1.0/tests/unit/test_utils.py +18 -0
- behave_runner-0.1.0/tests/unit/test_version.py +17 -0
- behave_runner-0.1.0/tests/unit/test_watcher.py +68 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug in behave-runner
|
|
3
|
+
title: "[bug]: "
|
|
4
|
+
labels: ["bug", "triage"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for taking the time to file a bug report!
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: description
|
|
12
|
+
attributes:
|
|
13
|
+
label: Description
|
|
14
|
+
description: A clear description of the bug.
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
- type: textarea
|
|
18
|
+
id: reproduce
|
|
19
|
+
attributes:
|
|
20
|
+
label: Steps to reproduce
|
|
21
|
+
description: Steps to reproduce the behavior.
|
|
22
|
+
placeholder: |
|
|
23
|
+
1. Run `behave-runner run ...`
|
|
24
|
+
2. See error
|
|
25
|
+
validations:
|
|
26
|
+
required: true
|
|
27
|
+
- type: textarea
|
|
28
|
+
id: expected
|
|
29
|
+
attributes:
|
|
30
|
+
label: Expected behavior
|
|
31
|
+
description: What you expected to happen.
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: textarea
|
|
35
|
+
id: actual
|
|
36
|
+
attributes:
|
|
37
|
+
label: Actual behavior
|
|
38
|
+
description: What actually happened.
|
|
39
|
+
validations:
|
|
40
|
+
required: true
|
|
41
|
+
- type: input
|
|
42
|
+
id: version
|
|
43
|
+
attributes:
|
|
44
|
+
label: behave-runner version
|
|
45
|
+
placeholder: "0.1.0"
|
|
46
|
+
validations:
|
|
47
|
+
required: true
|
|
48
|
+
- type: input
|
|
49
|
+
id: python
|
|
50
|
+
attributes:
|
|
51
|
+
label: Python version
|
|
52
|
+
placeholder: "3.13"
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
55
|
+
- type: textarea
|
|
56
|
+
id: extras
|
|
57
|
+
attributes:
|
|
58
|
+
label: Installed extras
|
|
59
|
+
description: Which behave-runner extras do you have installed?
|
|
60
|
+
placeholder: "parallel, priority, retry, trace"
|
|
61
|
+
- type: textarea
|
|
62
|
+
id: logs
|
|
63
|
+
attributes:
|
|
64
|
+
label: Logs / output
|
|
65
|
+
description: Relevant log output.
|
|
66
|
+
render: shell
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Documentation
|
|
4
|
+
url: https://mathiaspaulenko.github.io/behave-runner/
|
|
5
|
+
about: Read the docs before opening an issue.
|
|
6
|
+
- name: Discussions
|
|
7
|
+
url: https://github.com/MathiasPaulenko/behave-runner/discussions
|
|
8
|
+
about: Ask questions and discuss ideas in Discussions.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a feature for behave-runner
|
|
3
|
+
title: "[feature]: "
|
|
4
|
+
labels: ["enhancement", "triage"]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: problem
|
|
8
|
+
attributes:
|
|
9
|
+
label: Problem
|
|
10
|
+
description: What problem does this feature solve?
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: solution
|
|
15
|
+
attributes:
|
|
16
|
+
label: Proposed solution
|
|
17
|
+
description: What would you like behave-runner to do?
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: alternatives
|
|
22
|
+
attributes:
|
|
23
|
+
label: Alternatives considered
|
|
24
|
+
description: Any alternatives you've considered.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- markdownlint-disable MD041 -->
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
<!-- Brief description of what this PR does -->
|
|
6
|
+
|
|
7
|
+
## Type of change
|
|
8
|
+
|
|
9
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
10
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
11
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality
|
|
12
|
+
to not work as expected)
|
|
13
|
+
- [ ] Documentation update
|
|
14
|
+
- [ ] Refactor (no functional changes)
|
|
15
|
+
|
|
16
|
+
## Checklist
|
|
17
|
+
|
|
18
|
+
- [ ] `make check` passes (lint + format + test)
|
|
19
|
+
- [ ] `make test-cov` passes with >= 90% coverage
|
|
20
|
+
- [ ] New behavior is covered by tests
|
|
21
|
+
- [ ] `CHANGELOG.md` updated under `[Unreleased]`
|
|
22
|
+
- [ ] Documentation updated (if applicable)
|
|
23
|
+
- [ ] `mypy --strict` passes with no errors
|
|
24
|
+
|
|
25
|
+
## Related issues
|
|
26
|
+
|
|
27
|
+
<!-- Link to related issues: Closes #123 -->
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ci-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
lint:
|
|
18
|
+
name: Lint
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.12"
|
|
27
|
+
|
|
28
|
+
- name: Cache pip
|
|
29
|
+
uses: actions/cache@v4
|
|
30
|
+
with:
|
|
31
|
+
path: ~/.cache/pip
|
|
32
|
+
key: pip-lint-${{ hashFiles('pyproject.toml') }}
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: |
|
|
36
|
+
python -m pip install --upgrade pip
|
|
37
|
+
pip install -e ".[dev]"
|
|
38
|
+
|
|
39
|
+
- name: Ruff check
|
|
40
|
+
run: ruff check .
|
|
41
|
+
|
|
42
|
+
- name: Ruff format check
|
|
43
|
+
run: ruff format --check .
|
|
44
|
+
|
|
45
|
+
- name: Mypy
|
|
46
|
+
run: mypy --strict behave_runner
|
|
47
|
+
|
|
48
|
+
test:
|
|
49
|
+
name: Test (Python ${{ matrix.python-version }} on ${{ matrix.os }})
|
|
50
|
+
runs-on: ${{ matrix.os }}
|
|
51
|
+
strategy:
|
|
52
|
+
fail-fast: false
|
|
53
|
+
matrix:
|
|
54
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
55
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
|
|
59
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
60
|
+
uses: actions/setup-python@v5
|
|
61
|
+
with:
|
|
62
|
+
python-version: ${{ matrix.python-version }}
|
|
63
|
+
|
|
64
|
+
- name: Cache pip
|
|
65
|
+
uses: actions/cache@v4
|
|
66
|
+
with:
|
|
67
|
+
path: |
|
|
68
|
+
~/.cache/pip
|
|
69
|
+
~\AppData\Local\pip\Cache
|
|
70
|
+
key: pip-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
|
|
71
|
+
|
|
72
|
+
- name: Install dependencies
|
|
73
|
+
run: |
|
|
74
|
+
python -m pip install --upgrade pip
|
|
75
|
+
pip install -e ".[dev]"
|
|
76
|
+
|
|
77
|
+
- name: Run tests with coverage
|
|
78
|
+
run: pytest --cov=behave_runner --cov-report=xml --cov-report=term-missing --cov-fail-under=90 -m "not e2e_web and not e2e_api"
|
|
79
|
+
|
|
80
|
+
- name: Upload coverage to Codecov
|
|
81
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
82
|
+
uses: codecov/codecov-action@v4
|
|
83
|
+
with:
|
|
84
|
+
files: ./coverage.xml
|
|
85
|
+
fail_ci_if_error: false
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
pages: write
|
|
12
|
+
id-token: write
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: docs-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
name: Build docs
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
|
|
30
|
+
- name: Cache pip
|
|
31
|
+
uses: actions/cache@v4
|
|
32
|
+
with:
|
|
33
|
+
path: ~/.cache/pip
|
|
34
|
+
key: pip-docs-${{ hashFiles('pyproject.toml') }}
|
|
35
|
+
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: |
|
|
38
|
+
python -m pip install --upgrade pip
|
|
39
|
+
pip install -e ".[docs]"
|
|
40
|
+
|
|
41
|
+
- name: Build docs
|
|
42
|
+
run: mkdocs build --strict
|
|
43
|
+
|
|
44
|
+
- name: Upload artifact
|
|
45
|
+
uses: actions/upload-pages-artifact@v3
|
|
46
|
+
with:
|
|
47
|
+
path: site
|
|
48
|
+
|
|
49
|
+
deploy:
|
|
50
|
+
name: Deploy to GitHub Pages
|
|
51
|
+
needs: build
|
|
52
|
+
if: github.ref == 'refs/heads/main'
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
environment:
|
|
55
|
+
name: github-pages
|
|
56
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
57
|
+
steps:
|
|
58
|
+
- name: Configure Pages
|
|
59
|
+
uses: actions/configure-pages@v5
|
|
60
|
+
|
|
61
|
+
- name: Deploy
|
|
62
|
+
id: deployment
|
|
63
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- pyproject.toml
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: release-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
detect:
|
|
19
|
+
name: Detect version bump
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
outputs:
|
|
22
|
+
version: ${{ steps.version.outputs.version }}
|
|
23
|
+
changed: ${{ steps.version.outputs.changed }}
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0
|
|
28
|
+
|
|
29
|
+
- name: Set up Python
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: "3.12"
|
|
33
|
+
|
|
34
|
+
- name: Extract version
|
|
35
|
+
id: version
|
|
36
|
+
run: |
|
|
37
|
+
VERSION=$(python -c "from behave_runner import __version__; print(__version__)")
|
|
38
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
39
|
+
|
|
40
|
+
# Check if tag already exists
|
|
41
|
+
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
|
|
42
|
+
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
43
|
+
echo "Tag v$VERSION already exists, skipping release"
|
|
44
|
+
else
|
|
45
|
+
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
46
|
+
echo "New version detected: v$VERSION"
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
release:
|
|
50
|
+
name: Build and publish
|
|
51
|
+
needs: detect
|
|
52
|
+
if: needs.detect.outputs.changed == 'true'
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
environment: pypi
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v4
|
|
57
|
+
|
|
58
|
+
- name: Set up Python
|
|
59
|
+
uses: actions/setup-python@v5
|
|
60
|
+
with:
|
|
61
|
+
python-version: "3.12"
|
|
62
|
+
|
|
63
|
+
- name: Cache pip
|
|
64
|
+
uses: actions/cache@v4
|
|
65
|
+
with:
|
|
66
|
+
path: ~/.cache/pip
|
|
67
|
+
key: pip-release-${{ hashFiles('pyproject.toml') }}
|
|
68
|
+
|
|
69
|
+
- name: Install build dependencies
|
|
70
|
+
run: |
|
|
71
|
+
python -m pip install --upgrade pip
|
|
72
|
+
pip install build
|
|
73
|
+
|
|
74
|
+
- name: Build sdist and wheel
|
|
75
|
+
run: python -m build
|
|
76
|
+
|
|
77
|
+
- name: Create git tag
|
|
78
|
+
run: |
|
|
79
|
+
git config user.name "github-actions[bot]"
|
|
80
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
81
|
+
git tag "v${{ needs.detect.outputs.version }}"
|
|
82
|
+
git push origin "v${{ needs.detect.outputs.version }}"
|
|
83
|
+
|
|
84
|
+
- name: Publish to PyPI
|
|
85
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
86
|
+
|
|
87
|
+
- name: Create GitHub Release
|
|
88
|
+
uses: softprops/action-gh-release@v2
|
|
89
|
+
with:
|
|
90
|
+
tag_name: v${{ needs.detect.outputs.version }}
|
|
91
|
+
generate_release_notes: true
|
|
92
|
+
files: |
|
|
93
|
+
dist/*.whl
|
|
94
|
+
dist/*.tar.gz
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# Distribution / packaging
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
*.egg-info/
|
|
10
|
+
|
|
11
|
+
# Testing
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
htmlcov/
|
|
14
|
+
.coverage
|
|
15
|
+
coverage.xml
|
|
16
|
+
|
|
17
|
+
# Type checking
|
|
18
|
+
.mypy_cache/
|
|
19
|
+
.ruff_cache/
|
|
20
|
+
|
|
21
|
+
# Documentation
|
|
22
|
+
site/
|
|
23
|
+
|
|
24
|
+
# Reference / design docs
|
|
25
|
+
ref/
|
|
26
|
+
|
|
27
|
+
# OS
|
|
28
|
+
.DS_Store
|
|
29
|
+
Thumbs.db
|
|
30
|
+
|
|
31
|
+
# IDE
|
|
32
|
+
.idea/
|
|
33
|
+
.vscode/
|
|
34
|
+
*.swp
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.5.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: ["--fix"]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
10
|
+
rev: v1.10.0
|
|
11
|
+
hooks:
|
|
12
|
+
- id: mypy
|
|
13
|
+
args: ["--strict"]
|
|
14
|
+
additional_dependencies: []
|
|
15
|
+
|
|
16
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
17
|
+
rev: v4.6.0
|
|
18
|
+
hooks:
|
|
19
|
+
- id: trailing-whitespace
|
|
20
|
+
- id: end-of-file-fixer
|
|
21
|
+
- id: check-yaml
|
|
22
|
+
- id: check-toml
|
|
23
|
+
- id: check-added-large-files
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - 2026-07-08
|
|
6
|
+
|
|
7
|
+
- Initial release of `behave-runner` CLI.
|
|
8
|
+
- Commands: `run`, `list`, `select`, `lint`, `format`, `doctor`, `impact`,
|
|
9
|
+
`watch`, `report`, `trace`, `steps`, `generate`, `init`, `config`, `open`,
|
|
10
|
+
`record`.
|
|
11
|
+
- E2E test fixtures for `saucedemo.com` and `pokeapi.co`.
|
|
12
|
+
- CI workflow with matrix testing across Python 3.11-3.14.
|
|
13
|
+
- MkDocs Material documentation site.
|
|
14
|
+
- Community files: `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `SECURITY.md`,
|
|
15
|
+
`SUPPORT.md`, issue and pull request templates.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
[mathias@paulenko.dev](mailto:mathias@paulenko.dev). All complaints will be
|
|
64
|
+
reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
|
86
|
+
actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
+
ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
+
community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.1, available at
|
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
122
|
+
enforcement ladder][Mozilla CoC].
|
|
123
|
+
|
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
+
|
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Contributing to behave-runner
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing! This guide covers setup, common
|
|
4
|
+
commands, and the release process.
|
|
5
|
+
|
|
6
|
+
## Setup
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
git clone https://github.com/MathiasPaulenko/behave-runner.git
|
|
10
|
+
cd behave-runner
|
|
11
|
+
make dev
|
|
12
|
+
pre-commit install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Development commands
|
|
16
|
+
|
|
17
|
+
| Command | Description |
|
|
18
|
+
| ------------------- | -------------------------------------------- |
|
|
19
|
+
| `make help` | Show all available targets. |
|
|
20
|
+
| `make dev` | Install with dev extras. |
|
|
21
|
+
| `make lint` | Run `ruff check` + `mypy --strict`. |
|
|
22
|
+
| `make lint-fix` | Auto-fix lint issues. |
|
|
23
|
+
| `make format` | Format the code with `ruff format`. |
|
|
24
|
+
| `make format-check` | Verify formatting without changes. |
|
|
25
|
+
| `make test` | Run the test suite. |
|
|
26
|
+
| `make test-cov` | Run tests with coverage (fail under 90%). |
|
|
27
|
+
| `make check` | Full pre-commit check (lint + format + test).|
|
|
28
|
+
| `make build` | Build sdist + wheel into `dist/`. |
|
|
29
|
+
| `make docs-serve` | Serve documentation locally. |
|
|
30
|
+
| `make clean` | Remove build artifacts and caches. |
|
|
31
|
+
|
|
32
|
+
## Pre-PR checklist
|
|
33
|
+
|
|
34
|
+
Before opening a pull request, make sure all of the following pass:
|
|
35
|
+
|
|
36
|
+
- [ ] `make check` (runs lint + format-check + test)
|
|
37
|
+
- [ ] `make test-cov` passes with >= 90% coverage
|
|
38
|
+
- [ ] New behavior is covered by tests
|
|
39
|
+
- [ ] `CHANGELOG.md` updated under `[Unreleased]`
|
|
40
|
+
|
|
41
|
+
## Release process
|
|
42
|
+
|
|
43
|
+
Releases are automated via the `release.yml` GitHub Actions workflow:
|
|
44
|
+
|
|
45
|
+
1. Bump the version in `pyproject.toml`.
|
|
46
|
+
2. Move the `[Unreleased]` section in `CHANGELOG.md` to the new version.
|
|
47
|
+
3. Commit and push to `main`.
|
|
48
|
+
4. The workflow detects the version bump, creates a git tag, builds the
|
|
49
|
+
distributions, publishes to PyPI via Trusted Publishing (OIDC), and
|
|
50
|
+
creates a GitHub Release with auto-generated notes.
|
|
51
|
+
|
|
52
|
+
## Code style
|
|
53
|
+
|
|
54
|
+
- Python >=3.11, `from __future__ import annotations` in every module.
|
|
55
|
+
- `ruff` for linting and formatting (line length 100).
|
|
56
|
+
- `mypy --strict` with no errors.
|
|
57
|
+
- Frozen dataclasses where possible.
|
|
58
|
+
- Public API documented with docstrings (Google style).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Mathias Paulenko
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|