lint container, workflows and composer update (#2591)
This commit is contained in:
7
.github/workflows/coverage.yaml
vendored
7
.github/workflows/coverage.yaml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
matrix:
|
||||
php: ['7.4']
|
||||
|
||||
name: PHP ${{ matrix.php }}
|
||||
name: Coverage (${{ matrix.php }})
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: shivammathur/setup-php@v2
|
||||
@@ -29,9 +29,8 @@ jobs:
|
||||
php-version: ${{ matrix.php }}
|
||||
coverage: pcov
|
||||
extensions: mbstring, xml, ctype, iconv, intl, mysql, zip, gd, ldap
|
||||
- run: |
|
||||
composer install --no-progress
|
||||
composer require laminas/laminas-ldap
|
||||
- uses: ramsey/composer-install@v1
|
||||
- run: composer require laminas/laminas-ldap
|
||||
- name: Setup problem matchers for PHPUnit
|
||||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
||||
- name: Run tests
|
||||
|
||||
28
.github/workflows/linting.yaml
vendored
28
.github/workflows/linting.yaml
vendored
@@ -1,28 +0,0 @@
|
||||
name: Linting
|
||||
on:
|
||||
pull_request: null
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
php: ['7.4', '8.0']
|
||||
|
||||
name: PHP ${{ matrix.php }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
coverage: none
|
||||
extensions: mbstring, xml, ctype, iconv, intl, mysql, zip, gd, ldap
|
||||
tools: cs2pr:1.1.0
|
||||
- run: composer install --no-progress
|
||||
- run: composer validate --strict
|
||||
- run: vendor/bin/php-cs-fixer fix --dry-run --verbose --config=.php-cs-fixer.dist.php --using-cache=no --show-progress=none --format=checkstyle | cs2pr
|
||||
- run: vendor/bin/phpstan analyse src -c phpstan.neon --level=5 --no-progress --error-format=checkstyle | cs2pr
|
||||
- run: vendor/bin/phpstan analyse tests -c tests/phpstan.neon --level=5 --no-progress --error-format=checkstyle | cs2pr
|
||||
- run: composer kimai:code-lint
|
||||
41
.github/workflows/testing.yaml
vendored
41
.github/workflows/testing.yaml
vendored
@@ -5,7 +5,7 @@ on:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
tests:
|
||||
integration:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
mysql:
|
||||
@@ -21,31 +21,58 @@ jobs:
|
||||
matrix:
|
||||
php: ['7.3', '7.4', '8.0']
|
||||
|
||||
name: PHP ${{ matrix.php }}
|
||||
name: Integration (${{ matrix.php }})
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: shivammathur/setup-php@v2
|
||||
|
||||
- name: Clone Kimai
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
coverage: none
|
||||
extensions: mbstring, xml, ctype, iconv, intl, mysql, zip, gd, ldap
|
||||
- run: |
|
||||
composer install --no-progress
|
||||
composer require laminas/laminas-ldap
|
||||
tools: cs2pr:1.1.0
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ramsey/composer-install@v1
|
||||
|
||||
- name: Validate Composer
|
||||
run: composer validate --strict
|
||||
|
||||
- name: Check codestyles
|
||||
run: vendor/bin/php-cs-fixer fix --dry-run --verbose --config=.php-cs-fixer.dist.php --using-cache=no --show-progress=none --format=checkstyle | cs2pr
|
||||
|
||||
- name: Run PHPStan on Codebase
|
||||
run: vendor/bin/phpstan analyse src -c phpstan.neon --level=5 --no-progress --error-format=checkstyle | cs2pr
|
||||
|
||||
- name: Run PHPStan on Tests
|
||||
run: vendor/bin/phpstan analyse tests -c tests/phpstan.neon --level=5 --no-progress --error-format=checkstyle | cs2pr
|
||||
|
||||
- name: Lint codebase
|
||||
run: composer kimai:code-lint
|
||||
|
||||
- name: Install LDAP package
|
||||
run: composer require laminas/laminas-ldap
|
||||
|
||||
- name: Setup problem matchers for PHPUnit
|
||||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
||||
|
||||
- name: Run unit tests
|
||||
run: composer kimai:tests-unit
|
||||
env:
|
||||
DATABASE_URL: mysql://root:kimai@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/kimai?serverVersion=5.7
|
||||
APP_ENV: dev
|
||||
MAILER_URL: null://localhost
|
||||
|
||||
- name: Run integration tests
|
||||
run: composer kimai:tests-integration
|
||||
env:
|
||||
DATABASE_URL: mysql://root:kimai@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/kimai?serverVersion=5.7
|
||||
APP_ENV: dev
|
||||
MAILER_URL: null://localhost
|
||||
|
||||
- name: Run migrations on MySQL
|
||||
run: |
|
||||
bin/console doctrine:database:drop --if-exists --force -n
|
||||
|
||||
Reference in New Issue
Block a user