Remove scripts support because of cakephp 4.5 #50
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request | |
on: | |
pull_request: | |
jobs: | |
test_and_analyze: | |
name: PHP ${{ matrix.php-versions }} Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
operating-system: [ ubuntu-20.04 ] | |
php-versions: ['7.4', '8.0', '8.1', '8.2'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, intl, xdebug | |
- name: PHP Version | |
run: php -v | |
- name: Install dependencies | |
run: | | |
composer validate | |
composer install --prefer-dist --no-progress | |
- name: Test Suite + Static Analysis | |
run: composer check | |
coverage: | |
name: Code Coverage | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
operating-system: [ ubuntu-20.04 ] | |
php-versions: ['7.4'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, intl, xdebug | |
- name: PHP Version | |
run: php -v | |
- name: Install dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: | | |
composer validate | |
composer install --prefer-dist --no-progress --no-suggest | |
- name: Code Coverage | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
composer global require php-coveralls/php-coveralls | |
export CODECOVERAGE=1 && vendor/bin/phpunit --coverage-clover=clover.xml | |
php-coveralls --coverage_clover=clover.xml -v | |
compatibility: | |
name: CakePHP ${{ matrix.version }} Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
operating-system: [ ubuntu-20.04 ] | |
version: ['~4.2.0', '~4.3.0', '~4.4.0', '^4.5'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
extensions: mbstring, intl | |
- name: PHP Version | |
run: php -v | |
- name: CakePHP ${{matrix.version}} Compatability | |
run: | | |
composer self-update | |
rm -rf composer.lock | |
composer require cakephp/cakephp:${{matrix.version}} --no-update | |
composer install --prefer-dist --no-progress | |
composer test | |
integration_test: | |
name: Integration Test (Docker) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/[email protected] | |
- name: Docker Build | |
run: docker build -t cakepreloader:test tests/ --no-cache --build-arg BRANCH=dev-${{ steps.branch-name.outputs.current_branch }} | |
- name: Docker Run | |
run: docker run -d cakepreloader:test | |
- name: Test Container | |
run: | | |
if docker ps | grep "cakepreloader:test"; then | |
echo "container is running" | |
else | |
echo "container is not running" | |
exit 1 | |
fi | |