Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
140 additions
and
147 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
service_name: github-actions | ||
coverage_clover: Tests/reports/clover.xml | ||
json_path: Tests/reports/coveralls.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: Test application | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- '[0-9]+.x' | ||
- '[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
test: | ||
name: 'PHP ${{ matrix.php-version }} (${{ matrix.dependency-versions }}, Lint ${{ matrix.lint }}, Coverage ${{ matrix.coverage }})' | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
DATABASE_URL: mysql://root:root@127.0.0.1:3306/su_headless_test?serverVersion=5.7 | ||
DATABASE_CHARSET: utf8mb4 | ||
DATABASE_COLLATE: utf8mb4_unicode_ci | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- php-version: '7.2' | ||
lint: false | ||
coverage: false | ||
dependency-versions: 'lowest' | ||
tools: 'composer:v1' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: disabled | ||
|
||
- php-version: '7.4' | ||
lint: true | ||
coverage: true | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
|
||
- php-version: '8.0' | ||
lint: false | ||
coverage: false | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
composer-options: '--ignore-platform-reqs' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
|
||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
env: | ||
MYSQL_ROOT_PASSWORD: root | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: ctype, iconv, mysql | ||
coverage: pcov | ||
tools: ${{ matrix.tools }} | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v1 | ||
with: | ||
dependency-versions: ${{ matrix.dependency-versions }} | ||
composer-options: ${{ matrix.composer-options }} | ||
|
||
- name: Bootstrap test environment | ||
run: composer bootstrap-test-environment | ||
|
||
- name: Execute test | ||
if: matrix.coverage == false | ||
run: composer test | ||
|
||
- name: Execute test with coverage | ||
if: ${{ matrix.coverage }} | ||
run: composer test-with-coverage | ||
|
||
- name: Lint Code | ||
if: ${{ matrix.lint }} | ||
run: composer lint | ||
|
||
- name: Install Coverage all | ||
if: ${{ matrix.coverage }} | ||
run: | | ||
composer require --dev php-coveralls/php-coveralls | ||
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar | ||
chmod +x php-coveralls.phar | ||
./php-coveralls.phar --version | ||
- name: Coverage all upload | ||
if: ${{ matrix.coverage }} | ||
run: | | ||
export COVERALLS_REPO_TOKEN=Oa0R2jn3DOKzycfdtvhZKBxgFcRufVPFo | ||
export COVERALLS_RUN_LOCALLY=1 | ||
./php-coveralls.phar -c .coveralls.yml -vvv | ||
#env: | ||
# COVERALLS_RUN_LOCALLY: 1 | ||
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
|
||
- name: Check coverage | ||
if: ${{ matrix.coverage }} | ||
run: composer check-coverage |
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
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
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
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
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
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
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