Release/1.0.0 alpha1 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pull request | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
branches: | |
- master | |
jobs: | |
check-pull-request-master: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check branch prefix | |
run: | | |
BRANCH_NAME=${GITHUB_HEAD_REF} | |
if [[ "$BRANCH_NAME" =~ ^release/|^hotfix/ ]]; then | |
echo "Branch name is valid." | |
else | |
echo "Error: Branch name must start with 'release/', or 'hotfix/'." | |
exit 1 | |
fi | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Run PHP CodeSniffer (lint) | |
run: composer lint | |
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest | |
run: composer test |