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
12 changes: 3 additions & 9 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,14 @@ on:
- 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-24.04

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
36 changes: 10 additions & 26 deletions .github/workflows/composer-normalize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,20 @@ on:
push:
branches:
- main
paths:
- composer.json
- .github/workflows/composer-normalize.yml
pull_request:
branches:
- main
paths:
- composer.json
- .github/workflows/composer-normalize.yml

jobs:
composer-normalize:
name: Normalize composer.json (check)
runs-on: ubuntu-24.04

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: Cache Composer dependencies
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-

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

- name: Normalize composer.json (check)
uses: openCoreEMR/github-workflows-public/.github/workflows/php-composer-script.yml@0.0.4
with:
name: Normalize composer.json (check)
run: composer normalize --dry-run
php-version: '8.2'
26 changes: 11 additions & 15 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:
composer-validate:
name: Validate composer.json
runs-on: ubuntu-24.04

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
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'
26 changes: 1 addition & 25 deletions .github/workflows/conventional-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,4 @@ on:

jobs:
conventional-pr-title:
runs-on: ubuntu-24.04
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
deps
requireScope: false
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
uses: openCoreEMR/github-workflows-public/.github/workflows/conventional-pr-title.yml@0.0.4
37 changes: 7 additions & 30 deletions .github/workflows/dclint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,21 @@ on:
branches:
- main
paths:
- '**/compose.yml'
- '**/compose.yaml'
- '**/docker-compose*.yml'
- '**/docker-compose*.yaml'
- compose.yml
- compose.yaml
- .github/workflows/dclint.yml
pull_request:
branches:
- main
paths:
- '**/compose.yml'
- '**/compose.yaml'
- '**/docker-compose*.yml'
- '**/docker-compose*.yaml'
- compose.yml
- compose.yaml
- .github/workflows/dclint.yml

jobs:
dclint:
name: Lint Docker Compose files
runs-on: ubuntu-24.04

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

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'

- name: Install dclint
run: npm install -g dclint

- name: Run dclint
run: |
git ls-files -z 'compose.yml' \
'compose.yaml' \
'docker-compose*.yml' \
'docker-compose*.yaml' \
'**/compose.yml' \
'**/compose.yaml' \
'**/docker-compose*.yml' \
'**/docker-compose*.yaml' |
xargs --null --no-run-if-empty dclint
uses: openCoreEMR/github-workflows-public/.github/workflows/dclint.yml@0.0.4
31 changes: 15 additions & 16 deletions .github/workflows/php-syntax-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +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-24.04

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'
44 changes: 18 additions & 26 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +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-24.04

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: Cache Composer dependencies
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
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'
51 changes: 20 additions & 31 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +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-24.04

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: Cache Composer dependencies
uses: actions/cache@v5
with:
path: |
vendor
tools/openemr/vendor
key: ${{ runner.os }}-composer-phpstan-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-phpstan-

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

- name: Install dependencies (tools/openemr sub-vendor)
run: composer install --working-dir=tools/openemr --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'
39 changes: 3 additions & 36 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,6 @@ on:

jobs:
phpunit:
name: PHP ${{ matrix.php-version }} Tests
runs-on: ubuntu-24.04

strategy:
fail-fast: false
matrix:
php-version:
- '8.2'
- '8.3'
- '8.4'

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: json, mbstring
coverage: none
tools: composer:v2

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

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

- name: Run PHPUnit
run: composer phpunit
uses: openCoreEMR/github-workflows-public/.github/workflows/php-tests.yml@0.0.4
with:
php-versions: '["8.2"]'
Loading