PHP Classes

File: .github/workflows/ci.yml

Recommend this page to a friend!
  Packages of Adrian M   PHP CRUD API Generator   .github/workflows/ci.yml   Download  
File: .github/workflows/ci.yml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP CRUD API Generator
Create an API to access MySQL database record
Author: By
Last change:
Date: 3 months ago
Size: 2,201 bytes
 

Contents

Class file image Download
name: CI on: push: branches: [ main, refactor-phase-2, feature/** ] pull_request: branches: [ main, refactor-phase-2 ] jobs: build-test: runs-on: ubuntu-latest services: mysql: image: mysql:8.0 env: MYSQL_ALLOW_EMPTY_PASSWORD: "yes" MYSQL_DATABASE: test MYSQL_ROOT_PASSWORD: "" ports: - 3306:3306 options: >- --health-cmd="mysqladmin ping -h 127.0.0.1 --silent" --health-interval=10s --health-timeout=5s --health-retries=30 strategy: matrix: php: [ '8.2', '8.3' ] steps: - name: Checkout uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: mbstring, json, pdo, pdo_mysql coverage: none - name: Validate composer.json and composer.lock run: composer validate --no-check-publish - name: Install dependencies run: composer install --no-interaction --no-progress --prefer-dist - name: Install MySQL client run: sudo apt-get update && sudo apt-get install -y mysql-client - name: Wait for MySQL run: | for i in {1..60}; do mysqladmin ping -h 127.0.0.1 --silent && break sleep 2 done mysql -h 127.0.0.1 -uroot -e "SHOW DATABASES;" - name: Generate autoload run: composer dump-autoload -o - name: PHPStan run: | if [ -f phpstan.neon ] || [ -f phpstan.neon.dist ]; then \ vendor/bin/phpstan analyse --no-progress; \ else \ echo "Skipping PHPStan"; \ fi - name: PHPCS continue-on-error: true run: | if [ -f phpcs.xml ] || [ -f phpcs.xml.dist ]; then \ vendor/bin/phpcs; \ else \ echo "Skipping PHPCS"; \ fi - name: PHPUnit run: | if [ -f phpunit.xml ] || [ -f phpunit.xml.dist ]; then \ vendor/bin/phpunit -c phpunit.xml; \ else \ echo "Skipping PHPUnit"; \ fi