-
Notifications
You must be signed in to change notification settings - Fork 29
60 lines (51 loc) · 1.37 KB
/
main.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
56
57
58
59
60
name: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_DATABASE: codeception_test
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: codeception_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
matrix:
php: [8.0, 8.1, 8.2]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo, pgsql, mysql, sqlite
coverage: none
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --no-progress --no-interaction
- name: Run test suite
run: php vendor/bin/codecept run
env:
PGPASSWORD: postgres
MYSQL_DSN: "mysql:host=127.0.0.1;port=3306;dbname=codeception_test"