Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ on:
push:
branches:
- main
paths:
- .github/workflows/**
- .github/actions/**
pull_request:
branches:
- main
paths:
- .github/workflows/**
- .github/actions/**

jobs:
actionlint:
name: Lint GitHub Actions workflows
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Run actionlint
uses: rhysd/actionlint@v1.7.12
uses: openCoreEMR/github-workflows-public/.github/workflows/actionlint.yml@0.0.4
28 changes: 12 additions & 16 deletions .github/workflows/composer-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,21 @@ on:
push:
branches:
- main
paths:
- composer.json
- .github/workflows/composer-validate.yml
pull_request:
branches:
- main
paths:
- composer.json
- .github/workflows/composer-validate.yml

jobs:
validate:
name: Validate composer.json
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
tools: composer:v2

- name: Validate composer.json
composer-validate:
uses: openCoreEMR/github-workflows-public/.github/workflows/php-composer-script.yml@0.0.4
with:
name: Validate composer.json
run: composer validate --strict
install-deps: false
php-version: '8.2'
32 changes: 15 additions & 17 deletions .github/workflows/php-syntax-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,23 @@ on:
push:
branches:
- main
paths:
- '**.php'
- composer.json
- .github/workflows/php-syntax-check.yml
pull_request:
branches:
- main
paths:
- '**.php'
- composer.json
- .github/workflows/php-syntax-check.yml

jobs:
syntax:
name: Check PHP Syntax
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none

- name: Check PHP syntax
run: |
find src bin -name "*.php" -exec php -l {} \;
php-syntax-check:
uses: openCoreEMR/github-workflows-public/.github/workflows/php-composer-script.yml@0.0.4
with:
name: PHP Syntax Check
run: composer php-lint
install-deps: false
php-version: '8.2'
45 changes: 18 additions & 27 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,28 @@ on:
push:
branches:
- main
paths:
- '**.php'
- .phpcs.xml*
- phpcs.xml*
- composer.json
- composer.lock
- .github/workflows/phpcs.yml
pull_request:
branches:
- main
paths:
- '**.php'
- .phpcs.xml*
- phpcs.xml*
- composer.json
- composer.lock
- .github/workflows/phpcs.yml

jobs:
phpcs:
name: Run PHP CodeSniffer
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: json, zip, xml, simplexml
coverage: none
tools: composer:v2

- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction

- name: Run PHP CodeSniffer
uses: openCoreEMR/github-workflows-public/.github/workflows/php-composer-script.yml@0.0.4
with:
name: Run PHP CodeSniffer
run: composer phpcs
php-version: '8.2'
47 changes: 20 additions & 27 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,30 @@ on:
push:
branches:
- main
paths:
- '**.php'
- phpstan.neon
- phpstan.neon.dist
- phpstan-baseline.neon
- composer.json
- composer.lock
- .github/workflows/phpstan.yml
pull_request:
branches:
- main
paths:
- '**.php'
- phpstan.neon
- phpstan.neon.dist
- phpstan-baseline.neon
- composer.json
- composer.lock
- .github/workflows/phpstan.yml

jobs:
phpstan:
name: Run PHPStan
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: json, zip, xml, simplexml
coverage: none
tools: composer:v2

- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction

- name: Run PHPStan
uses: openCoreEMR/github-workflows-public/.github/workflows/php-composer-script.yml@0.0.4
with:
name: Run PHPStan
run: composer phpstan
php-version: '8.2'
32 changes: 4 additions & 28 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,7 @@ on:

jobs:
phpunit:
name: Run PHPUnit (Unit Tests)
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: json, zip, xml, simplexml
coverage: none
tools: composer:v2

- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction

- name: Run PHPUnit (unit tests only)
run: vendor/bin/phpunit --testsuite unit --testdox
uses: openCoreEMR/github-workflows-public/.github/workflows/php-tests.yml@0.0.4
with:
php-versions: '["8.2"]'
test-script: composer test:unit
43 changes: 16 additions & 27 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,26 @@ on:
push:
branches:
- main
paths:
- '**.php'
- rector.php
- composer.json
- composer.lock
- .github/workflows/rector.yml
pull_request:
branches:
- main
paths:
- '**.php'
- rector.php
- composer.json
- composer.lock
- .github/workflows/rector.yml

jobs:
rector:
name: Run Rector (dry-run)
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: json, zip, xml, simplexml
coverage: none
tools: composer:v2

- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction

- name: Run Rector (dry-run)
uses: openCoreEMR/github-workflows-public/.github/workflows/php-composer-script.yml@0.0.4
with:
name: Run Rector (dry-run)
run: composer rector
php-version: '8.2'