-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (35 loc) · 1.34 KB
/
python-mutation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Mutation Test Project
on: [pull_request, workflow_dispatch]
jobs:
mutation-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.2.2
- name: Install dependencies
run: |
# installing dependencies used by the project
poetry install --no-interaction --no-ansi -v
- name: Unit and Coverage Test with pytest
run: |
# stop the build if there are any unit test failures
# or if our tests do not cover a significant
# amount of code
poetry run pytest -m "not integrationtest" --cov=deadseeker --cov-fail-under=95 --cov-branch --cov-report=term-missing
- name: Mutation Test with mutmut
run: |
# stop the build if the tests that we wrote are
# not very good
poetry run mutmut run --swallow-output