Skip to content

Commit

Permalink
[RequestMapper]: Added GitHub workflows and update dependencies for s…
Browse files Browse the repository at this point in the history
…upporting symfony 5.4 and 6.0 and Refactoring
  • Loading branch information
fractalzombie committed Dec 5, 2021
1 parent 3b85189 commit d6bfca7
Showing 1 changed file with 74 additions and 44 deletions.
118 changes: 74 additions & 44 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: CI

on:
push:
Expand All @@ -12,53 +12,83 @@ on:
types: [ published, created, edited ]

jobs:
build:
build-test:
runs-on: self-hosted

strategy:
matrix:
php:
- "8.0"
- "8.1"
include:
- php-version: "8.0"
composer-options: "--ignore-platform-reqs"

- php-version: "8.1"
composer-options: "--ignore-platform-reqs"

steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: xdebug
tools: pecl, phpunit, composer
ini-values: post_max_size=256M
- uses: php-actions/composer@v5

- name: Setup Composer
uses: ramsey/composer-install@v1
- name: PHPUnit Tests
uses: php-actions/phpunit@v2
with:
composer-options: "${{ matrix.composer-options }}"

- name: Validate composer.json and composer.lock
run: composer validate

- 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: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer update --prefer-dist --no-progress
php_extensions: xdebug
bootstrap: bootstrap.php
configuration: phpunit.xml.dist
args: --coverage-text

- name: Unit Tests
run: ./vendor/bin/phpunit --colors=always --verbose --configuration phpunit.xml.dist --log-junit var/tests/.phpunit.output.xml
#name: Tests
#
#on:
# push:
# branches: [ main ]
#
# pull_request:
# branches: [ main ]
#
# page_build:
# release:
# types: [ published, created, edited ]
#
#jobs:
# build:
# runs-on: self-hosted
#
# strategy:
# matrix:
# php:
# - "8.0"
# - "8.1"
# include:
# - php-version: "8.0"
# composer-options: "--ignore-platform-reqs"
#
# - php-version: "8.1"
# composer-options: "--ignore-platform-reqs"
#
# steps:
# - name: Checkout
# uses: actions/checkout@v2
#
# - name: Setup PHP
# uses: shivammathur/setup-php@v2
# with:
# php-version: "${{ matrix.php }}"
# coverage: xdebug
# tools: pecl, phpunit, composer
# ini-values: post_max_size=256M
#
# - name: Setup Composer
# uses: ramsey/composer-install@v1
# with:
# composer-options: "${{ matrix.composer-options }}"
#
# - name: Validate composer.json and composer.lock
# run: composer validate
#
# - 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: Install dependencies
# if: steps.composer-cache.outputs.cache-hit != 'true'
# run: composer update --prefer-dist --no-progress
#
# - name: Unit Tests
# run: ./vendor/bin/phpunit --colors=always --verbose --configuration phpunit.xml.dist --log-junit var/tests/.phpunit.output.xml

0 comments on commit d6bfca7

Please sign in to comment.