MT-cod/php-project-lvl2

View on GitHub
.github/workflows/workflow.yml

Summary

Maintainability
Test Coverage
name: PHP CI
on:
  - push
  - pull_request
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
        # Check-out repository under GitHub workspace
      - uses: actions/checkout@v2
        # Step's name
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          # Specify the PHP version
          php-version: '8.0'
      - name: Install
        # Install project
        run: make install
      - name: Linter
        # Run Linter
        run: make lint
        # Publish code coverage on Code Climate
        # https://github.com/paambaati/codeclimate-action
      - name: Run test & publish code coverage
        uses: paambaati/codeclimate-action@v2.6.0
        # Add Code Climate secret key
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
        with:
          coverageCommand: make test-coverage
          coverageLocations: ${{github.workplace}}clover.xml:clover
          debug: true