Skip to content

Update Package.php #440

Update Package.php

Update Package.php #440

Workflow file for this run

on:
- pull_request
- push
name: build
jobs:
tests:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
env:
extensions: fileinfo
key: cache-v1
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
php:
- "7.4"
mariadb:
- "10.5"
services:
mariadb:
image: mariadb:${{ matrix.mariadb }}
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: yiitest
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up NodeJS
uses: actions/setup-node@v2
with:
node-version: '13'
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-values: date.timezone='UTC'
tools: composer:v2
- name: Determine composer cache directory on Linux
if: matrix.os == 'ubuntu-latest'
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
- name: Cache dependencies installed with composer
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php }}-composer-
- name: Install dependencies with Composer
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- name: Set up application
run: |
./init --env=Development
sed -i "s/'username' => 'yiiframeworkcom',/'username' => 'travis',/" config/params-local.php
sed -i "s/'password' => 'yiiframeworkcom',/'password' => '',/" config/params-local.php
sed -i "s/'cookieValidationKey' => ''/'cookieValidationKey' => 'testkey'/" config/web-local.php
- name: Install node dependencies
run: npm install -g gulp-cli && npm install
- name: Compile assets
run: touch assets/src/scss/2-vendors/contributors.css && gulp build
- name: Run tests with codeception
run: |
php -S localhost:8080 -t public > ./runtime/yii.log 2>&1 &
vendor/bin/codecept run