-
Notifications
You must be signed in to change notification settings - Fork 232
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
4 changed files
with
125 additions
and
65 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
* text=auto | ||
|
||
/Tests export-ignore | ||
/.github export-ignore | ||
.doctrine-project.json export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.travis.yml export-ignore | ||
phpcs.xml.dist export-ignore | ||
phpunit.xml.dist export-ignore |
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,123 @@ | ||
name: "Continuous Integration" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*.x" | ||
- "master" | ||
push: | ||
|
||
env: | ||
fail-fast: true | ||
|
||
jobs: | ||
phpunit: | ||
name: "PHPUnit" | ||
runs-on: "${{ matrix.os }}" | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- "ubuntu-20.04" | ||
php-version: | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
symfony-version: | ||
- "4.4.x" | ||
- "5.1.x" | ||
driver-version: | ||
- "stable" | ||
deps: | ||
- "normal" | ||
include: | ||
- deps: "low" | ||
os: "ubuntu-20.04" | ||
php-version: "7.2" | ||
driver-version: "1.5.0" | ||
symfony-version: "4.4.*" | ||
|
||
services: | ||
mongodb: | ||
image: "mongo" | ||
ports: | ||
- "27017:27017" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Setup cache environment | ||
id: extcache | ||
uses: shivammathur/cache-extensions@v1 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: "mongodb-${{ matrix.driver-version }}" | ||
key: "extcache-v1" | ||
|
||
- name: Cache extensions | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.extcache.outputs.dir }} | ||
key: ${{ steps.extcache.outputs.key }} | ||
restore-keys: ${{ steps.extcache.outputs.key }} | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
tools: "pecl" | ||
extensions: "mongodb-${{ matrix.driver-version }}" | ||
coverage: "xdebug" | ||
ini-values: "zend.assertions=1" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-locked-" | ||
|
||
- name: "Install Symfony" | ||
run: "composer require symfony/symfony:${{ matrix.symfony-version }} --no-update" | ||
|
||
- name: "Install dependencies with composer" | ||
run: "composer update --no-interaction --no-progress --prefer-stable" | ||
if: "${{ matrix.deps == 'normal' }}" | ||
|
||
- name: "Install lowest possible dependencies with composer" | ||
run: "composer update --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest" | ||
if: "${{ matrix.deps == 'low' }}" | ||
|
||
- name: "Run PHPUnit" | ||
run: "vendor/bin/phpunit --coverage-clover=coverage.xml" | ||
|
||
- name: "Upload coverage file" | ||
uses: "actions/upload-artifact@v2" | ||
with: | ||
name: "phpunit-${{ matrix.php-version }}.coverage" | ||
path: "coverage.xml" | ||
|
||
upload_coverage: | ||
name: "Upload coverage to Codecov" | ||
runs-on: "ubuntu-20.04" | ||
needs: | ||
- "phpunit" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: "Download coverage files" | ||
uses: "actions/download-artifact@v2" | ||
with: | ||
path: "reports" | ||
|
||
- name: "Upload to Codecov" | ||
uses: "codecov/codecov-action@v1" | ||
with: | ||
directory: reports |
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