Skip to content

refactor: Copy Craft into place #26

refactor: Copy Craft into place

refactor: Copy Craft into place #26

name: Code Analysis
on:
pull_request: null
push:
branches:
- develop-v5
workflow_dispatch:
permissions:
contents: read
jobs:
code_analysis:
strategy:
fail-fast: false
matrix:
actions:
- name: 'PHPStan'
run: composer phpstan
- name: 'Coding Standards'
run: composer fix-cs
- name: 'Pest tests'
run: vendor/bin/pest
name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Setup PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: 'ctype,curl,dom,iconv,imagick,intl,json,mbstring,openssl,pcre,pdo,reflection,spl,zip'
ini-values: post_max_size=256M, max_execution_time=180, memory_limit=512M
tools: composer:v2
- name: Install Composer dependencies
run: composer install --no-interaction --no-ansi --no-progress
- name: Prepare Craft environment
run: cp .github/craft/.env.mysql .env
run: cp .github/craft/craft .craft

Check failure on line 54 in .github/workflows/code-analysis.yaml

View workflow run for this annotation

GitHub Actions / Code Analysis

Invalid workflow file

The workflow is not valid. .github/workflows/code-analysis.yaml (Line: 54, Col: 9): 'run' is already defined .github/workflows/code-analysis.yaml (Line: 55, Col: 9): 'run' is already defined
run: cp .github/craft/bootstrap.php bootstrap.php
- name: Add Docker database host aliases to build environment
run: sudo echo "127.0.0.1 mysql" | sudo tee -a /etc/hosts
- name: Install Craft
run: php craft install/craft --username=admin --password=password [email protected] --site-name=Craft Blog --site-url=$DEFAULT_SITE_URL --interactive=0
- run: ${{ matrix.actions.run }}