Skip to content

Commit

Permalink
Merge pull request #1320 from qstokkink/add_muttest_action
Browse files Browse the repository at this point in the history
Hook in weekly mutation test
  • Loading branch information
qstokkink authored Nov 1, 2024
2 parents ebfa3ba + 850ed6a commit 658cc33
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/weekly_mutation_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Weekly mutation tests (Friday 00:00)
on:
schedule:
- cron: '0 0 * * 5'

jobs:
mutationtests:
runs-on: ubuntu-latest
if: ${{ github.repository == 'Tribler/py-ipv8' }}
steps:
- name: Checkout Tribler/py-ipv8
uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'py-ipv8'
- name: Check for changes
run: |
cd py-ipv8
echo "NUM_COMMITS=$(git log --oneline --since '7 days ago' | wc -l)" >> $GITHUB_ENV
- name: Setup Python 3.10
uses: actions/setup-python@v5
if: ${{ env.NUM_COMMITS > 0 }}
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
if: ${{ env.NUM_COMMITS > 0 }}
run: |
cd py-ipv8
python -m pip install -r requirements.txt
- name: Checkout Tribler/mutpy
if: ${{ env.NUM_COMMITS > 0 }}
uses: actions/checkout@v4
with:
repository: 'Tribler/mutpy'
path: 'mutpy'
- name: Run mutation tests
if: ${{ env.NUM_COMMITS > 0 }}
run: |
cd mutpy
python3 -m pip install .
cd bin
python3 github_report.py --codebase ipv8
- name: Publish report
if: ${{ env.NUM_COMMITS > 0 }}
run: cat mutpy/bin/report.md >> $GITHUB_STEP_SUMMARY

0 comments on commit 658cc33

Please sign in to comment.