Skip to content

Commit

Permalink
Fix: Do not run mutation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Apr 30, 2023
1 parent 7a53a97 commit 0e8a6f5
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 513 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Expand Up @@ -6,7 +6,6 @@
/.gitignore export-ignore
/.php_cs export-ignore
/composer-require-checker.json export-ignore
/infection.json export-ignore
/Makefile export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon export-ignore
Expand Down
12 changes: 0 additions & 12 deletions .github/CONTRIBUTING.md
Expand Up @@ -82,18 +82,6 @@ $ make tests

to run all the tests.

## Mutation Tests

We are using [`infection/infection`](https://github.com/infection/infection) to ensure a minimum quality of the tests.

Enable `Xdebug` and run

```sh
$ make mutation-tests
```

to run mutation tests.

## Extra lazy?

Run
Expand Down
1 change: 0 additions & 1 deletion .github/settings.yml
Expand Up @@ -17,7 +17,6 @@ branches:
- "Code Coverage (7.4, locked)"
- "Coding Standards (7.4, locked)"
- "Dependency Analysis (7.4, locked)"
- "Mutation Tests (7.4, locked)"
- "Static Code Analysis (7.4, locked)"
- "Tests (7.4, highest)"
- "Tests (7.4, locked)"
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/integrate.yaml
Expand Up @@ -273,45 +273,3 @@ jobs:
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
run: "bash <(curl -s https://codecov.io/bash)"

mutation-tests:
name: "Mutation Tests"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"

dependencies:
- "locked"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@2.18.1"
with:
coverage: "xdebug"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"

- name: "Determine composer cache directory"
uses: "./.github/actions/composer/composer/determine-cache-directory"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v3"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "./.github/actions/composer/composer/install"
with:
dependencies: "${{ matrix.dependencies }}"

- name: "Run mutation tests with Xdebug and infection/infection"
run: "vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=${{ env.MIN_COVERED_MSI }} --min-msi=${{ env.MIN_MSI }}"
5 changes: 0 additions & 5 deletions Makefile
Expand Up @@ -25,11 +25,6 @@ dependency-analysis: vendor ## Runs a dependency analysis with maglnet/composer-
help: ## Displays this list of targets with descriptions
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: mutation-tests
mutation-tests: vendor ## Runs mutation tests with infection/infection
mkdir -p .build/infection
vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=${MIN_COVERED_MSI} --min-msi=${MIN_MSI}

.PHONY: static-code-analysis
static-code-analysis: vendor ## Runs a static code analysis with phpstan/phpstan and vimeo/psalm
mkdir -p .build/phpstan
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -31,7 +31,6 @@
"ergebnis/license": "^1.1.0",
"ergebnis/php-cs-fixer-config": "^2.14.0",
"ergebnis/test-util": "^1.5.0",
"infection/infection": "~0.15.3",
"nette/di": "^3.0.13",
"phpstan/phpstan-deprecation-rules": "^1.0.0",
"phpstan/phpstan-strict-rules": "^1.1.0",
Expand All @@ -53,7 +52,8 @@
},
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true
"ergebnis/composer-normalize": true,
"infection/extension-installer": true
},
"platform": {
"php": "7.4.29"
Expand Down

0 comments on commit 0e8a6f5

Please sign in to comment.