-
Notifications
You must be signed in to change notification settings - Fork 19
75 lines (71 loc) · 2.05 KB
/
ci.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
pull_request: ~
push:
branches:
- master
jobs:
tests:
name: Tests (PHP ${{ matrix.php }}, ext-mongodb ${{ matrix.mongo-ext }}, MongoDB ${{ matrix.mongo-img }}, Symfony ${{ matrix.symfony }})
runs-on: ubuntu-latest
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
services:
mongo:
image: mongo:${{ matrix.mongo-img }}
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootPass
# options: >-
# --health-cmd '/etc/init.d/mongodb status || exit 1'
# --health-interval 5s
# --health-timeout 3s
# --health-retries 5
strategy:
matrix:
include:
- php: 7.4
mongo-ext: 1.6.0
mongo-img: 4.2
symfony: "^4.4"
- php: 7.4
mongo-ext: 1.20.0
mongo-img: 5.0
symfony: "^4.4"
- php: 8.1
mongo-ext: 1.12.0
mongo-img: 5.0
symfony: "^5.4"
- php: 8.2
mongo-ext: 1.15.0
mongo-img: 6.0
symfony: "^6.4"
- php: 8.3
mongo-ext: 1.19.0
mongo-img: 7.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mongodb-${{ matrix.mongo-ext }}
tools: flex
- name: Allow unstable dependencies
run: composer config minimum-stability dev
if: matrix.symfony == 'dev-master'
- name: Install dependencies
uses: ramsey/composer-install@v3
- name: Await a bit for Mongo to spin up...
run: sleep 10
- name: Run tests
run: bin/phpunit --coverage-clover=build/coverage-report.xml
- name: Upload code coverage
uses: codecov/codecov-action@v5
with:
files: build/coverage-report.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true