Add mutation testing and contract test

This commit is contained in:
thePR0M3TH3AN
2025-07-01 15:47:29 -04:00
parent 3130a86c76
commit 9ec12bf19f
3 changed files with 84 additions and 2 deletions

View File

@@ -72,14 +72,19 @@ jobs:
if [ "${{ github.event_name }}" = "schedule" ]; then
echo "STRESS_ARGS=--stress" >> $GITHUB_ENV
fi
- name: Enable Nostr network tests on main branch
if: github.ref == 'refs/heads/main'
- name: Enable Nostr network tests on main branch or nightly
if: github.ref == 'refs/heads/main' || github.event_name == 'schedule'
run: echo "NOSTR_E2E=1" >> $GITHUB_ENV
- name: Run tests with coverage
shell: bash
run: |
pytest ${STRESS_ARGS} --cov=src --cov-report=xml --cov-report=term-missing \
--cov-fail-under=20 src/tests
- name: Run mutation tests
if: github.event_name == 'push'
run: |
mutmut run --paths-to-mutate src --tests-dir src/tests --runner "python -m pytest -q"
mutmut results
- name: Upload coverage report
uses: actions/upload-artifact@v4
with: