Skip to content

Added release workflow (#3) #21

Added release workflow (#3)

Added release workflow (#3) #21

Workflow file for this run

# Continuous Integration (CI) pipeline.
#
# Any time code is pushed to one of the main branches or a PR is opened, this pipeline should be
# run to ensure everything still works as designed and meets our coding standards.
name: CI Pipeline
# Execute on pushes to develop or main, as well as all PRs.
on:
push:
branches:
- develop
- main
pull_request:
# Cancel outstanding jobs for this workflow/branch combo.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Check coding standards (PHP_CodeSniffer, PHP-CS-Fixer, Shellcheck)
coding-standards:
name: PHPCS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure PHP environment
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring
coverage: none
- uses: ramsey/composer-install@v2
- name: Run PHPCS
run: composer test:standards
# Static Code Analysis (PHPStan)
static-code-analysis:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure PHP environment
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring, intl
coverage: none
- uses: ramsey/composer-install@v2
- name: Run PHPStan
run: composer test:analysis
# Execute all PHPUnit tests.
phpunit:
name: PHPUnit (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['8.0', '8.1', '8.2', '8.3']
services:
mysql:
image: mysql:${{ (matrix.php-versions < 7.4 && '5.7') || '8.0' }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10
steps:
- uses: actions/checkout@v4
- name: Configure PHP environment
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, mysqli
coverage: none
- uses: ramsey/composer-install@v2
with:
dependency-versions: highest
- name: Run PHPUnit
run: composer test:unit