Skip to content

Commit e60d426

Browse files
authored
Replace Travis by Github Actions (#6)
* Create main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update composer.json * Update main.yml
1 parent db1a281 commit e60d426

File tree

2 files changed

+141
-1
lines changed

2 files changed

+141
-1
lines changed

.github/workflows/main.yml

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
9+
services:
10+
mysql:
11+
image: mysql:5.7
12+
env:
13+
MYSQL_ALLOW_EMPTY_PASSWORD: true
14+
MYSQL_DATABASE: symfony_test
15+
ports:
16+
- 3306:3306
17+
options: >-
18+
--health-cmd "mysqladmin ping"
19+
--health-interval 10s
20+
--health-timeout 5s
21+
--health-retries 5
22+
23+
strategy:
24+
matrix:
25+
php: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4]
26+
symfony: [2.8, 3.4, 4, 5]
27+
exclude:
28+
- php: 7.0
29+
symfony: 2.8
30+
- php: 7.1
31+
symfony: 2.8
32+
- php: 7.2
33+
symfony: 2.8
34+
- php: 7.3
35+
symfony: 2.8
36+
- php: 7.4
37+
symfony: 2.8
38+
- php: 5.6
39+
symfony: 3.4
40+
- php: 7.3
41+
symfony: 3.4
42+
- php: 7.4
43+
symfony: 3.4
44+
- php: 5.6
45+
symfony: 4
46+
- php: 7.0
47+
symfony: 4
48+
- php: 5.6
49+
symfony: 5
50+
- php: 7.0
51+
symfony: 5
52+
- php: 7.1
53+
symfony: 5
54+
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@v2
58+
59+
- name: Setup PHP
60+
uses: shivammathur/setup-php@v2
61+
with:
62+
php-version: ${{ matrix.php }}
63+
extensions: pdo, mysql, sqlite
64+
coverage: none
65+
66+
- name: Checkout Symfony 2.8 Sample
67+
if: matrix.symfony == 2.8
68+
uses: actions/checkout@v2
69+
with:
70+
repository: Codeception/symfony-demo
71+
path: framework-tests
72+
ref: 2.1
73+
74+
- name: Checkout Symfony 3.4 Sample
75+
if: matrix.symfony == 3.4
76+
uses: actions/checkout@v2
77+
with:
78+
repository: Naktibalda/codeception-symfony-tests
79+
path: framework-tests
80+
submodules: recursive
81+
82+
- name: Checkout Symfony 4 Sample
83+
if: matrix.symfony == 4
84+
uses: actions/checkout@v2
85+
with:
86+
repository: Codeception/symfony-demo
87+
path: framework-tests
88+
89+
- name: Checkout Symfony 5 Sample
90+
if: matrix.symfony == 5
91+
uses: actions/checkout@v2
92+
with:
93+
repository: Codeception/symfony-demo
94+
path: framework-tests
95+
ref: symfony5
96+
97+
- name: Install Symfony Sample
98+
run: |
99+
composer update --no-dev --prefer-dist --no-interaction
100+
working-directory: framework-tests
101+
102+
- name: Validate composer.json and composer.lock
103+
run: composer validate
104+
105+
- name: Install dependencies
106+
run: |
107+
composer require "symfony/finder=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
108+
composer require "symfony/yaml=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
109+
composer require "symfony/console=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
110+
composer require "symfony/event-dispatcher=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
111+
composer require "symfony/css-selector=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
112+
composer require "symfony/dom-crawler=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
113+
composer require "symfony/browser-kit=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
114+
composer install --prefer-dist --no-progress --no-interaction --no-suggest
115+
116+
- name: Database Symfony 2.8
117+
if: matrix.symfony == 2.8
118+
run: |
119+
php app/console doctrine:schema:create -n --env test
120+
php app/console doctrine:fixtures:load -n --env test
121+
working-directory: framework-tests
122+
123+
- name: Database Symfony 3.4
124+
if: matrix.symfony == 3.4
125+
run: |
126+
sed -i -e "s/%database_host%/127.0.0.1/g" app/config/config.yml
127+
sed -i -e "s/%database_port%/3306/g" app/config/config.yml
128+
sed -i -e "s/%database_name%/symfony_test/g" app/config/config.yml
129+
sed -i -e "s/%database_user%/root/g" app/config/config.yml
130+
sed -i -e "s/%database_password%//g" app/config/config.yml
131+
php bin/console doctrine:schema:update --force -n
132+
working-directory: framework-tests
133+
134+
- name: Run test suite Symfony > 2.8
135+
if: matrix.symfony != 2.8
136+
run: php vendor/bin/codecept run functional -c framework-tests
137+
138+
- name: Run test suite Symfony 2.8
139+
if: matrix.symfony == 2.8
140+
run: php vendor/bin/codecept run functional -c framework-tests/src/AppBundle
141+

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
}
1212
],
1313
"minimum-stability": "RC",
14-
1514
"require": {
1615
"php": ">=5.6.0 <8.0",
1716
"codeception/lib-innerbrowser": "^1.0",

0 commit comments

Comments
 (0)