Skip to content

Commit 8b9035f

Browse files
authored
Merge pull request #75 from glensc/travis-to-gha
Setup GitHub Actions
2 parents 8b23f0a + 11998de commit 8b9035f

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: "Tests: MongoDB"
2+
3+
on:
4+
- pull_request
5+
6+
jobs:
7+
mongodb:
8+
name: PHP ${{ matrix.php }}
9+
runs-on: ubuntu-20.04
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
php:
14+
- "7.1"
15+
- "7.2"
16+
- "7.3"
17+
- "7.4"
18+
env:
19+
PHPUNIT_VERSION: "7.5"
20+
PHP_VERSION: "${{ matrix.php }}"
21+
22+
services:
23+
mongodb:
24+
image: percona/percona-server-mongodb:4.0
25+
ports:
26+
- 27017:27017
27+
28+
steps:
29+
- name: Checkout Code
30+
uses: actions/checkout@v2
31+
32+
- name: Setup PHP
33+
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: ${{ matrix.php }}
36+
extensions: xdebug, xhprof, mongodb, tideways_xhprof
37+
38+
- name: Validate composer.json and composer.lock
39+
run: composer validate
40+
41+
- name: Install dependencies
42+
run: |
43+
composer install --prefer-dist --no-progress
44+
composer require --dev phpunit/phpunit:^$PHPUNIT_VERSION
45+
46+
- name: Install extensions
47+
run: ./install-extensions.sh
48+
49+
- name: Run PHPUnit tests
50+
run: composer test
51+
52+
# vim:ft=yaml:et:ts=2:sw=2

0 commit comments

Comments
 (0)