Skip to content

php-forge/actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHPForge - actions reusable


Requeriments

  • PHP.

Usage

Example of using the Dependency check

on:
  pull_request:
    paths-ignore:
      - 'docs/**'
      - 'README.md'
      - 'CHANGELOG.md'
      - '.gitignore'
      - '.gitattributes'
      - 'infection.json.dist'
      - 'phpunit.xml.dist'
      - 'psalm.xml'

  push:
    branches: ['main']
    paths-ignore:
      - 'docs/**'
      - 'README.md'
      - 'CHANGELOG.md'
      - '.gitignore'
      - '.gitattributes'
      - 'infection.json.dist'
      - 'phpunit.xml.dist'
      - 'psalm.xml'

name: dependency-check

jobs:
  composer-require-checker:
    uses: php-forge/actions/.github/workflows/composer-require-checker.yml@main
    secrets:
      AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} # for repository private
    with:
      os: >-
        ['ubuntu-latest']
      php: >-
        ['8.1', '8.2']

Example of using the Easy Coding Standard

on:
  pull_request:
    paths-ignore:
      - 'docs/**'
      - 'README.md'
      - 'CHANGELOG.md'
      - '.gitignore'
      - '.gitattributes'
      - 'infection.json.dist'
      - 'phpunit.xml.dist'

  push:
    branches: ['main']
    paths-ignore:
      - 'docs/**'
      - 'README.md'
      - 'CHANGELOG.md'
      - '.gitignore'
      - '.gitattributes'
      - 'infection.json.dist'
      - 'phpunit.xml.dist'

name: ecs

jobs:
  easy-coding-standard:
    uses: php-forge/actions/.github/workflows/ecs.yml@main
    secrets:
      AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} # for repository private
    with:
      os: >-
        ['ubuntu-latest']
      php: >-
        ['8.1', '8.2']

Example of using the PHPUnit action.

on:
  pull_request:
    paths-ignore:
      - 'docs/**'
      - 'README.md'
      - 'CHANGELOG.md'
      - '.gitignore'
      - '.gitattributes'
      - 'infection.json.dist'
      - 'psalm.xml'

  push:
    branches: ['main']
    paths-ignore:
      - 'docs/**'
      - 'README.md'
      - 'CHANGELOG.md'
      - '.gitignore'
      - '.gitattributes'
      - 'infection.json.dist'
      - 'psalm.xml'
  
name: build

jobs:
  phpunit:
    uses: php-forge/actions/.github/workflows/phpunit.yml@main
    secrets:
      AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} # for repository private
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
    with:
      # coverage: pcov / coverage: xdebug / coverage: xdebug2 / coverage: none 
      # extensions: ext-php 
      # ini-values: date.timezone='UTC'      
      os: >-
        ['ubuntu-latest', 'windows-latest']
      php: >-
        ['8.0', '8.1']
      #tools: composer:v2 

Example of using the PSALM action.

on:
  pull_request:
    paths-ignore:
      - 'docs/**'
      - 'README.md'
      - 'CHANGELOG.md'
      - '.gitignore'
      - '.gitattributes'
      - 'infection.json.dist'
      - 'psalm.xml'

  push:
    branches: ['main']
    paths-ignore:
      - 'docs/**'
      - 'README.md'
      - 'CHANGELOG.md'
      - '.gitignore'
      - '.gitattributes'
      - 'infection.json.dist'
      - 'psalm.xml'

name: static analysis

jobs:
  psalm:
    uses: php-forge/actions/.github/workflows/psalm.yml@main
    secrets:
      AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} # for repository private   
    with:
      # extensions: ext-php 
      # ini-values: date.timezone='UTC'       
      os: >-
        ['ubuntu-latest']
      php: >-
        ['7.4', '8.0', '8.1']
      #tools: composer:v2, cs2pr 

Example of using the ROAVE-INFECTION action.

on:
  pull_request:
    paths-ignore:
      - 'docs/**'
      - 'README.md'
      - 'CHANGELOG.md'
      - '.gitignore'
      - '.gitattributes'
      - 'infection.json.dist'
      - 'psalm.xml'

  push:
    branches: ['main']
    paths-ignore:
      - 'docs/**'
      - 'README.md'
      - 'CHANGELOG.md'
      - '.gitignore'
      - '.gitattributes'
      - 'infection.json.dist'
      - 'psalm.xml'

name: mutation test

jobs:
  mutation:
    uses: php-forge/actions/.github/workflows/roave-infection.yml@main
    secrets:
      AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} # for repository private
      STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}    
    with:
      # coverage: pcov / coverage: xdebug / coverage: xdebug2 / coverage: none 
      # extensions: ext-php
      # ini-values: date.timezone='UTC'   
      os: >-
        ['ubuntu-latest']
      php: >-
        ['8.1']
      #tools: composer:v2        

Our social networks

Twitter

License

The MIT License (MIT). Please see License File for more information.