az-digital/az_quickstart#3290: Drupal 10.3.x changes. #32
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 Checks | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
pre-merge-checks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Check for branch in Quickstart repo | |
id: check-quickstart-branch | |
run: | | |
if [ $(git ls-remote --heads https://github.com/az-digital/az_quickstart.git ${{ github.head_ref }} | wc -l) = 1 ]; then | |
echo "QUICKSTART_BRANCH_NAME=${{ github.head_ref }}" >> ${GITHUB_ENV} | |
else | |
echo "QUICKSTART_BRANCH_NAME=main" >> ${GITHUB_ENV} | |
fi | |
- name: Check for branch in scaffolding repo | |
id: check-scaffolding-branch | |
run: | | |
if [ $(git ls-remote --heads https://github.com/az-digital/az-quickstart-scaffolding.git ${{ github.head_ref }} | wc -l) = 1 ]; then | |
echo "SCAFFOLDING_BRANCH_NAME=${{ github.head_ref }}" >> ${GITHUB_ENV} | |
else | |
echo "SCAFFOLDING_BRANCH_NAME=main" >> ${GITHUB_ENV} | |
fi | |
- name: Checkout scaffolding repo | |
uses: actions/checkout@v4 | |
with: | |
repository: az-digital/az-quickstart-scaffolding | |
ref: ${{ env.SCAFFOLDING_BRANCH_NAME }} | |
path: az-quickstart-scaffolding | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
extensions: mbstring, intl | |
tools: composer:v2 | |
- name: Build Arizona Quickstart | |
run: | | |
composer self-update | |
cd $GITHUB_WORKSPACE/az-quickstart-scaffolding | |
composer config repositories.az_quickstart vcs https://github.com/az-digital/az_quickstart.git | |
composer config use-github-api false | |
composer require --no-update az-digital/az_quickstart:dev-${{ env.QUICKSTART_BRANCH_NAME }} | |
composer require --no-update --dev az-digital/az-quickstart-dev:dev-${{ github.head_ref }} | |
composer install -o | |
- name: Run PHPCS | |
run: | | |
cd $GITHUB_WORKSPACE/az-quickstart-scaffolding | |
composer phpcs | |
- name: Run PHPStan | |
run: | | |
cd $GITHUB_WORKSPACE/az-quickstart-scaffolding | |
./vendor/bin/phpstan analyse --configuration web/profiles/custom/az_quickstart/phpstan.neon web/profiles/custom/az_quickstart | |