Skip to content

Commit

Permalink
add gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Mar 28, 2024
1 parent e093446 commit f2eff8d
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 8 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build

on:
push:
pull_request:


jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['8.0', '8.1', '8.2','8.3']
phpunit-versions: ['latest']

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Validate PHP version
run: php -v

- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress

- name: Run static code analysis
run: vendor/bin/phpstan

- name: check outdated packages
run: composer outdated

7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,21 @@
}
],
"require": {
"php": ">=8.0.2",
"yiisoft/yii2": "^2.0.5",
"kartik-v/yii2-widget-select2": "^2.1.0",
"kartik-v/yii2-widget-depdrop": "^1.0.4",
"kartik-v/yii2-password": "^1.5.3",
"kartik-v/yii2-widget-datepicker": "^1.4.0",
"kartik-v/yii2-widget-datetimepicker": "^1.4.0"
},
"require-dev": {
"phpstan/phpstan": "^1.8"
},

"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
"dev-master": "1.5.x-dev"
}
},
"autoload": {
Expand Down
7 changes: 0 additions & 7 deletions scrutinizer.yml

This file was deleted.

0 comments on commit f2eff8d

Please sign in to comment.