diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 743b076..6dfc4bf 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -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 @@ -31,4 +31,27 @@ jobs: - name: ☂️ Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file + 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') }} diff --git a/.gitignore b/.gitignore index 489eb25..05eeb9a 100644 --- a/.gitignore +++ b/.gitignore @@ -180,4 +180,7 @@ docs/.env docs/.env.production # macOS-specific files -docs/.DS_Store \ No newline at end of file +docs/.DS_Store + +html/ +.mutmut-cache \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt index 0445f91..8750e5b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -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 \ No newline at end of file +flake8~=6.1.0 +mutmut~=2.4.4 \ No newline at end of file