-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
115 additions
and
45 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Python Mutation Test | ||
|
||
on: | ||
push: | ||
paths: | ||
- requirements.txt | ||
- src/** | ||
- tests/** | ||
- .github/workflows/python-mutation-test.yml | ||
pull_request: | ||
paths: | ||
- requirements.txt | ||
- src/** | ||
- tests/** | ||
workflow_dispatch: | ||
|
||
concurrency: updates-project | ||
|
||
jobs: | ||
mutmut: | ||
name: Mutation Test with Mutmut | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
- name: Install Dependencies and Tools | ||
run: | | ||
pip install -r requirements.txt --upgrade | ||
pip install mutmut --upgrade | ||
pip install --editable . | ||
- name: coverage | ||
run: pytest --cov=src --sort-mode=fastest --cov-context=test | ||
- name: Mutmut | ||
run: python3 -m mutmut run --no-progress --rerun-all --paths-to-mutate src | ||
--runner "pytest -x --assert=plain --sort-bucket-mode=diffcov --sort-bucket=function --sort-mode=fastest" | ||
- run: python3 -m mutmut results | ||
if: ${{ always() }} | ||
- name: Mutmut Report | ||
if: ${{ always() }} | ||
run: | | ||
python3 -m mutmut html | ||
python3 -m mutmut junitxml > mutation-testing-report.xml | ||
- name: save-xml-report | ||
if: ${{ github.ref_name == 'main' }} | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
add: "mutation-testing-report.xml" | ||
pull: "--rebase=true --autostash" | ||
- name: save-reports | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Mutation testing report | ||
path: html | ||
poodle: | ||
name: Mutation Test with Poodle | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
- name: Install Dependencies and Tools | ||
run: | | ||
pip install -r requirements.txt --upgrade | ||
pip install --editable . | ||
- name: Poodle | ||
run: poodle |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
name: Python Platform Tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- requirements.txt | ||
- src/** | ||
- tests/** | ||
- .github/workflows/python-test-matrix.yml | ||
pull_request: | ||
paths: | ||
- requirements.txt | ||
- src/** | ||
- tests/** | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- requirements.txt | ||
- src/** | ||
- tests/** | ||
- .github/workflows/python-test-matrix.yml | ||
pull_request: | ||
paths: | ||
- requirements.txt | ||
- src/** | ||
- tests/** | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pytest-matrix: | ||
name: Pytest | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
py: ['3.9','3.10','3.11','3.12'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
- name: Install Dependencies and Tools | ||
run: | | ||
pip install -r requirements.txt --upgrade | ||
- run: pytest | ||
- name: Poodle example project | ||
run : | | ||
pip install --editable . | ||
cd example | ||
poodle | ||
pytest-matrix: | ||
name: Pytest & Poodle | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
py: ['3.9','3.10','3.11','3.12'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
- name: Install Dependencies and Tools | ||
run: | | ||
pip install -r requirements.txt --upgrade | ||
- run: pytest | ||
- name: Poodle example project | ||
run : | | ||
pip install --editable . | ||
cd example | ||
poodle |
This file contains 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