Skip to content

Commit 50e70cc

Browse files
committed
Merge branch 'master' into match-with-enableLogging-and-Profiling
2 parents 4802d62 + a0c575b commit 50e70cc

File tree

6 files changed

+62
-95
lines changed

6 files changed

+62
-95
lines changed

.github/workflows/build.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: build
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
7+
8+
jobs:
9+
phpunit:
10+
name: PHP ${{ matrix.php }} on ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
12+
services:
13+
mongodb:
14+
image: mongo:${{ matrix.mongo }}
15+
ports:
16+
- 27017:27017
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest]
21+
php: ['7.0', '7.1', '7.2', '7.3', '7.4']
22+
mongo: ['3']
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
- name: Install PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ matrix.php }}
31+
tools: pecl
32+
extensions: mongodb
33+
ini-values: date.timezone='UTC'
34+
- name: Get composer cache directory
35+
id: composer-cache
36+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
37+
- name: Cache composer dependencies
38+
uses: actions/cache@v1
39+
with:
40+
path: ${{ steps.composer-cache.outputs.dir }}
41+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
42+
restore-keys: ${{ runner.os }}-composer-
43+
- name: Install dependencies
44+
run: composer update $DEFAULT_COMPOSER_FLAGS
45+
- name: PHP Unit tests for PHP 7.1
46+
run: vendor/bin/phpunit --verbose --coverage-clover=coverage.clover --colors=always
47+
if: matrix.php == '7.1'
48+
- name: PHP Unit tests for PHP >= 7.2
49+
run: vendor/bin/phpunit --verbose --colors=always
50+
if: matrix.php >= '7.2'
51+
- name: PHP Unit tests for PHP <= 7.0
52+
run: vendor/bin/phpunit --verbose --colors=always
53+
if: matrix.php <= '7.0'
54+
- name: Code coverage
55+
run: |
56+
wget https://scrutinizer-ci.com/ocular.phar
57+
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
58+
if: matrix.php == '7.1'
59+
continue-on-error: true # if is fork

.travis.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Documentation is at [docs/guide/README.md](docs/guide/README.md).
1414

1515
[![Latest Stable Version](https://poser.pugx.org/yiisoft/yii2-mongodb/v/stable.png)](https://packagist.org/packages/yiisoft/yii2-mongodb)
1616
[![Total Downloads](https://poser.pugx.org/yiisoft/yii2-mongodb/downloads.png)](https://packagist.org/packages/yiisoft/yii2-mongodb)
17-
[![Build Status](https://travis-ci.com/yiisoft/yii2-mongodb.svg?branch=master)](https://travis-ci.com/yiisoft/yii2-mongodb)
17+
[![Build Status](https://github.com/yiisoft/yii2-mongodb/workflows/build/badge.svg)](https://github.com/yiisoft/yii2-mongodb/actions)
1818

1919

2020
Installation

tests/data/config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
$config = [
99
'mongodb' => [
10-
'dsn' => 'mongodb://travis:test@localhost:27017/yii2test',
10+
'dsn' => 'mongodb://localhost:27017/yii2test',
1111
'options' => [],
1212
'driverOptions' => [],
1313
]
@@ -17,4 +17,4 @@
1717
include(__DIR__ . '/config.local.php');
1818
}
1919

20-
return $config;
20+
return $config;

tests/data/travis/README.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/data/travis/mongodb-setup.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)