-
Notifications
You must be signed in to change notification settings - Fork 44
54 lines (50 loc) · 1.47 KB
/
tests.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
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.sha }}-tests
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.4', '8.0', '8.1']
codeception: ['^4.0', '^5.0']
exclude:
# Codeception 5 requires PHP ≥ 8
- php: '7.4'
codeception: '^5.0'
steps:
- uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.1
- run: gem install mime-types --version "< 3"
- run: gem install --conservative mailcatcher
- run: mailcatcher
# Temporary workaround for https://github.com/sj26/mailcatcher/issues/182
- run: mailcatcher -f > out.txt&
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
ini-values: "sendmail_path = /usr/bin/env catchmail -f [email protected]"
php-version: ${{ matrix.php }}
- uses: ramsey/composer-install@v2
with:
dependency-versions: highest
composer-options: "--with=codeception/codeception:${{ matrix.codeception }}"
- run: php vendor/bin/codecept build
- name: Acceptance tests
run: php vendor/bin/codecept run acceptance -d
- name: Unit tests
env:
XDEBUG_MODE: coverage
run: php vendor/bin/codecept run unit --coverage-xml -d