diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index ab375e62aba..00000000000 --- a/.coveralls.yml +++ /dev/null @@ -1,4 +0,0 @@ -# for php-coveralls -#src_dir: src -coverage_clover: coverage.clover -json_path: coveralls-upload.json \ No newline at end of file diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000000..b2ed1e285c1 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,91 @@ +name: Coverage +on: + push: + branches: + - '*' + tags: + - '*' + paths: + - '**' + - '!*.md' + pull_request: + paths: + - '**' + - '!*.md' +jobs: + phpunit: + name: PHPUnit + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + operating-system: [ ubuntu-18.04 ] + php: [ 7.4 ] + db: [ pgsql ] + include: + - db: pgsql + database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db + database_server_version: 11 + services: + postgres: + image: postgres:11 + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: password + ports: + - 5432:5432 + # needed because the postgres container does not provide a healthcheck + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Get Composer Cache Directory + id: composer-cache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- + + - name: Setup PHP + uses: nanasess/setup-php@master + with: + php-version: ${{ matrix.php }} + + - name: composer install + run: | + sudo composer selfupdate --1 + composer install --dev --no-interaction -o --apcu-autoloader + + - name: Setup EC-CUBE + env: + DATABASE_URL: ${{ matrix.database_url }} + DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} + run: | + bin/console doctrine:database:create + bin/console doctrine:schema:create + bin/console eccube:fixtures:load + + - name: PHPUnit + env: + APP_ENV: 'test' + DATABASE_URL: ${{ matrix.database_url }} + DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }} + MAILER_URL: 'smtp://localhost:1025' + continue-on-error: true + run: | + bin/phpunit --version + phpdbg -dmemory_limit=-1 -qrr bin/phpunit --exclude-group cache-clear,cache-clear-install,update-schema-doctrine --coverage-clover=coverage1.xml + - name: Upload coverage + uses: codecov/codecov-action@v1 + with: + files: ./coverage1.xml + # token: ${{ secrets.CODECOV_TOKEN }} + flags: tests + # yml: ./codecov.yml + fail_ci_if_error: true diff --git a/README.md b/README.md index 04a3aa004ac..683b47e08f7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # EC-CUBE 4.0 [![Build Status](https://travis-ci.com/EC-CUBE/ec-cube.svg?branch=4.0)](https://travis-ci.com/EC-CUBE/ec-cube) -[![Coverage Status](https://coveralls.io/repos/github/EC-CUBE/ec-cube/badge.svg?branch=4.0)](https://coveralls.io/github/EC-CUBE/ec-cube?branch=4.0) +[![codecov](https://codecov.io/gh/EC-CUBE/ec-cube/branch/4.0/graph/badge.svg?token=BhnPjjvfwd)](https://codecov.io/gh/EC-CUBE/ec-cube) [![Slack](https://img.shields.io/badge/slack-join%5fchat-brightgreen.svg?style=flat)](https://join.slack.com/t/ec-cube/shared_invite/enQtNDA1MDYzNDQxMTIzLTY5MTRhOGQ2MmZhMjQxYTAwMmVlMDc5MDU2NjJlZmFiM2E3M2Q0M2Y3OTRlMGY4NTQzN2JiZDBkNmQwNTUzYzc) diff --git a/composer.json b/composer.json index 5ae11e79883..d9ab5baf85b 100644 --- a/composer.json +++ b/composer.json @@ -114,7 +114,6 @@ "dama/doctrine-test-bundle": "^5.0", "fzaninotto/faker": "^1.7", "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.1", "phpstan/phpstan": "^0.12", "phpunit/phpunit": "^6.5", "symfony/browser-kit": "^3.4", diff --git a/composer.lock b/composer.lock index 5fe8525b98d..dbff3992dd2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c16b344c17ca75e636f20181046d0e6b", + "content-hash": "f08a40e6e4ddeb44b7f799dcc48116ca", "packages": [ { "name": "composer/ca-bundle", @@ -9275,89 +9275,6 @@ }, "time": "2017-03-05T17:38:23+00:00" }, - { - "name": "php-coveralls/php-coveralls", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "3e6420fa666ef7bae5e750ddeac903153e193bae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3e6420fa666ef7bae5e750ddeac903153e193bae", - "reference": "3e6420fa666ef7bae5e750ddeac903153e193bae", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.0", - "php": "^5.5 || ^7.0", - "psr/log": "^1.0", - "symfony/config": "^2.1 || ^3.0 || ^4.0 || ^5.0", - "symfony/console": "^2.1 || ^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0 || ^5.0", - "symfony/yaml": "^2.0.5 || ^3.0 || ^4.0 || ^5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" - }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" - }, - "bin": [ - "bin/php-coveralls" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCoveralls\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp", - "role": "Original creator" - }, - { - "name": "Takashi Matsuo", - "email": "tmatsuo@google.com" - }, - { - "name": "Google Inc" - }, - { - "name": "Dariusz Ruminski", - "email": "dariusz.ruminski@gmail.com", - "homepage": "https://github.com/keradus" - }, - { - "name": "Contributors", - "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" - } - ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/php-coveralls/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "time": "2019-11-20T16:29:20+00:00" - }, { "name": "phpdocumentor/reflection-common", "version": "2.0.0", diff --git a/symfony.lock b/symfony.lock index 7d74c13d637..0226c380b31 100644 --- a/symfony.lock +++ b/symfony.lock @@ -203,9 +203,6 @@ "php": { "version": "7.1.3" }, - "php-coveralls/php-coveralls": { - "version": "v2.0.0" - }, "php-cs-fixer/diff": { "version": "v1.2.0" },