name: PHP Composer

on:
  push:
  pull_request:
  workflow_dispatch:
  schedule:
    - cron: "0 0 1 * *"

jobs:
  build:
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        php: [ '7.3', '7.4', '8.0' ]

    steps:
      - uses: actions/checkout@v2

      - name: Setup PHP
        uses: nanasess/setup-php@master
        with:
          php-version: ${{ matrix.php }}

      - name: PHP ${{ matrix.php }} - Validate composer.json and composer.lock
        run: composer validate

      - name: PHP ${{ matrix.php }} - Cache Composer packages
        id: composer-cache
        uses: actions/cache@v2
        with:
          path: vendor
          key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
          restore-keys: |
            ${{ runner.os }}-php-

      - name: PHP ${{ matrix.php }} - Install dependencies
        if: steps.composer-cache.outputs.cache-hit != 'true'
        run: composer install

      - name: PHP ${{ matrix.php }} - Run coverage test suite
        run: composer run-script coverage

      - name: PHP ${{ matrix.php }} - Publish Coverage
        uses: paambaati/codeclimate-action@v2.7.5
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

name: PHP Composer

on:
  push:
  pull_request:
  workflow_dispatch:
  schedule:
    - cron: "0 0 1 * *"

jobs:
  build:
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        php: [ '7.3', '7.4', '8.0' ]

    steps:
      - uses: actions/checkout@v2

      - name: Setup PHP
        uses: nanasess/setup-php@master
        with:
          php-version: ${{ matrix.php }}

      - name: PHP ${{ matrix.php }} - Validate composer.json and composer.lock
        run: composer validate

      - name: PHP ${{ matrix.php }} - Cache Composer packages
        id: composer-cache
        uses: actions/cache@v2
        with:
          path: vendor
          key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
          restore-keys: |
            ${{ runner.os }}-php-

      - name: PHP ${{ matrix.php }} - Install dependencies
        if: steps.composer-cache.outputs.cache-hit != 'true'
        run: composer install

      - name: PHP ${{ matrix.php }} - Run coverage test suite
        env:
          apiKey: ${{ secrets.STEAM_API_KEY }}
        run: composer run-script coverage

      - name: PHP ${{ matrix.php }} - Publish Coverage
        uses: paambaati/codeclimate-action@v2.7.5
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

Add api key to secrets
Add api key to secrets

