mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-26 02:40:41 -06:00
54 lines
1.6 KiB
YAML
54 lines
1.6 KiB
YAML
name: Mutation tests
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
test-group:
|
|
type: string
|
|
required: true
|
|
description: One of unit, db, api or cli
|
|
|
|
jobs:
|
|
mutation-tests:
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
matrix:
|
|
php-version: [ '8.1' ]
|
|
env:
|
|
extensions: openswoole-4.11.1
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
- name: Setup cache environment
|
|
id: extcache
|
|
uses: shivammathur/cache-extensions@v1
|
|
with:
|
|
php-version: ${{ matrix.php-version }}
|
|
extensions: ${{ env.extensions }}
|
|
key: mutation-tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }}
|
|
- name: Cache extensions
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ${{ steps.extcache.outputs.dir }}
|
|
key: ${{ steps.extcache.outputs.key }}
|
|
restore-keys: ${{ steps.extcache.outputs.key }}
|
|
- name: Use PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-version }}
|
|
tools: composer
|
|
extensions: ${{ env.extensions }}
|
|
coverage: pcov
|
|
ini-values: pcov.directory=module
|
|
- name: Install dependencies
|
|
run: composer install --no-interaction --prefer-dist
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
path: build
|
|
- if: ${{ inputs.test-group == 'unit' }}
|
|
run: composer infect:ci:unit
|
|
env:
|
|
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
|
|
- if: ${{ inputs.test-group != 'unit' }}
|
|
run: composer infect:ci:${{ inputs.test-group }}
|