Skip to content

Commit

Permalink
Add codestyle action
Browse files Browse the repository at this point in the history
  • Loading branch information
maks-rafalko committed May 14, 2024
1 parent ffa8b0a commit d41b2b7
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: [infection]
open_collective: infection
2 changes: 2 additions & 0 deletions .github/tests_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
comment: Thank you for contributing to Infection. We noticed you didn't add any tests. Could you please add them to make sure everything works as expected?
fileExtensions: ['.php']
54 changes: 54 additions & 0 deletions .github/workflows/cs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# yamllint disable rule:line-length
# yamllint disable rule:braces

name: Coding Standards

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

jobs:
coding-standards:
runs-on: ubuntu-latest

strategy:
matrix:
operating-system: [ ubuntu-latest ]
php-version: [ '8.1' ]
check: [ 'cs' ]

name: Coding Standards on PHP ${{ matrix.php-version }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php-version }}-
composer-${{ runner.os }}-
composer-
- name: Install dependencies
run: |
composer install --no-interaction --no-progress --prefer-dist
- name: Run ${{ matrix.check }}
run: make ${{ matrix.check }}

0 comments on commit d41b2b7

Please sign in to comment.