Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷🏻 Adding Mutation Testing to CI/CD Process #27

Merged
merged 22 commits into from
Nov 11, 2023
Merged
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
31 changes: 27 additions & 4 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:

steps:
- name: 🔄 Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: 🐍 Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.x # Specify your desired Python version
python-version: 3.11

- name: 📦 Install dependencies
run: pip install -r requirements-dev.txt # Replace with your requirements file
Expand All @@ -31,4 +31,27 @@ jobs:
- name: ☂️ Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: 🗃️ Uncache Mutation Testing Artifacts
uses: actions/cache/restore@v3
with:
path: .mutmut-cache
key: ${{ runner.os }}-mutmut-cache-${{ hashFiles('bookshelf/*.py') }}

- name: 🦠 Run Mutation Tests
run: |
mutmut run --no-progress --CI
mutmut html

- name: 📤 Upload Mutation Test Report
uses: actions/upload-artifact@v2
with:
name: mutmut-html-report
path: html/bookshelf

- name: 🗃️ Cache Mutation Test Cache
uses: actions/cache/save@v3
with:
path: .mutmut-cache
key: ${{ runner.os }}-mutmut-cache-${{ hashFiles('bookshelf/*.py') }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,7 @@ docs/.env
docs/.env.production

# macOS-specific files
docs/.DS_Store
docs/.DS_Store

html/
.mutmut-cache
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ assertpy~=1.1.0
pytest==7.4.3
pytest-cov==4.1.0
setuptools==68.2.2
flake8~=6.1.0
flake8~=6.1.0
mutmut~=2.4.4
Loading