EscolaLMS/model-fields

View on GitHub
.github/workflows/mutation.yml

Summary

Maintainability
Test Coverage
name: Mutation Tests PHPUnit in environments

on:
  push:
    branches:
      - main
      - master
  pull_request:

jobs:
  php8-mysql:
    runs-on: ubuntu-latest
    container:
      image: escolalms/php:8-work

    services:
      mysql:
        image: mysql:5.7
        env:
          MYSQL_ROOT_PASSWORD: root
          MYSQL_DATABASE: database
          MYSQL_PASSWORD: password
          MYSQL_USER: username
        ports:
          - 33306:3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

    steps:
      - name: Instantiate package
        run: apt-get install git -y

      - name: Instantiate package
        uses: actions/checkout@v2

      - name: Setup environment
        run: cp env/mysql/* .

      - name: Update composer
        run: composer update

      - name: Clear config
        run: vendor/bin/testbench config:clear

      - name: Publish things
        run: vendor/bin/testbench migrate:fresh

      - name: Generate keys
        run: |
          vendor/bin/testbench passport:keys --force
          vendor/bin/testbench passport:client --personal --no-interaction

      - name: Run tests
        run: ./vendor/bin/infection --min-msi=48 --min-covered-msi=70 --threads=4
        env:
          INFECTION_DASHBOARD_API_KEY: ${{ secrets.INFECTION_DASHBOARD_API_KEY }}