-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4943 from nanasess/use-codecov
Codecov によるコードカバレッジを追加
- Loading branch information
Showing
6 changed files
with
93 additions
and
93 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,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:[email protected]: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 |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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