Skip to content

Commit

Permalink
workflow updates
Browse files Browse the repository at this point in the history
  • Loading branch information
WiredNerd committed Dec 1, 2023
1 parent 2d99484 commit b5c208c
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 45 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/python-mutation-test.yml
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
68 changes: 34 additions & 34 deletions .github/workflows/python-test-matrix.yml
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
22 changes: 11 additions & 11 deletions .github/workflows/python-test-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: Python Tests and Scans
on:
push:
paths:
- requirements.txt
- src/**
- tests/**
- .github/workflows/python-test-scan.yml
- requirements.txt
- src/**
- tests/**
- .github/workflows/python-test-scan.yml
pull_request:
paths:
- requirements.txt
- src/**
- tests/**
- requirements.txt
- src/**
- tests/**
workflow_dispatch:

concurrency: updates-project
Expand All @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Install Dependencies and Tools
run: |
pip install -r requirements.txt --upgrade
Expand All @@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Install Dependencies and Tools
run: |
pip install -r requirements.txt --upgrade
Expand All @@ -62,7 +62,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Install Dependencies and Tools
run: |
pip install -r requirements.txt --upgrade
Expand All @@ -87,7 +87,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Install Dependencies and Tools
run: |
pip install -r requirements.txt --upgrade
Expand Down

0 comments on commit b5c208c

Please sign in to comment.