-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (49 loc) · 1.21 KB
/
ci-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Test
on:
push:
branches:
tags:
pull_request:
env:
DB_HOST: 0.0.0.0
DB_PORT: 27017
DB_CONNECTION: mongodb
DB_USERNAME: root
DB_PASSWORD: root
DB_DATABASE: application
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
php: ['7.2', '7.3', '7.4']
mongodb: ['4.0', '4.2']
services:
mongo:
image: mongo:${{ matrix.mongodb}}
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
steps:
- uses: actions/checkout@v2
- name: Setup php
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php }}
extension: dom, mbstring, mongodb, mcrypt
coverage: xdebug
- name: Show php version
run: php${{ matrix.php }} -v && composer -V && php -m
- name: Install dependencies
run: composer install
- name: Run database migrations
run: |
php${{ matrix.php }} artisan migrate
- name: Run tests
run: ./vendor/bin/phpunit
- name: Run test console command
run: |
php${{ matrix.php }} artisan geo:index