-
-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (48 loc) · 1.26 KB
/
run-tests.yaml
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
56
57
58
name: "Run tests"
on:
push:
branches:
- main
paths-ignore:
- .docker/**
pull_request:
branches:
- main
paths-ignore:
- .docker/**
jobs:
testing:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.0]
name: For PHP ${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Start MongoDB
uses: getong/[email protected]
with:
mongo version: '4.4.6'
host port: 27017
mongo username: 'root'
mongo password: 'root'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
- name: Duplicate example env file
run: cp .env.example .env
- name: Install dependencies
run: composer install --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit --testdox --coverage-clover build/logs/clover.xml
env:
DB_HOST: localhost