Skip to content

Commit ab22a7e

Browse files
committed
Don't run phpunit tests on Travis
Since they're already run in the CI workflow on GitHub Actions
1 parent 19f238b commit ab22a7e

File tree

7 files changed

+65
-39
lines changed

7 files changed

+65
-39
lines changed

.travis.yml

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ cache:
66
- $HOME/.npm
77

88
.steps:
9-
- &add-composer-bin-dir-to-path |
10-
export PATH="$PATH:$HOME/.composer/vendor/bin"
119
- &clear-test-app-cache |
1210
tests/Fixtures/app/console cache:clear
1311
- &disable-php-memory-limit |
@@ -33,13 +31,11 @@ cache:
3331

3432
jobs:
3533
include:
36-
- name: '(PHP 7.1)'
34+
- name: 'Behat (PHP 7.1)'
3735
php: '7.1'
3836
before_install:
39-
- *enable-mongodb-php-extension
4037
- *disable-xdebug-php-extension
4138
- *disable-php-memory-limit
42-
- *add-composer-bin-dir-to-path
4339
install:
4440
- |
4541
composer remove --dev --no-progress --no-update --ansi \
@@ -49,74 +45,99 @@ jobs:
4945
before_script:
5046
- *clear-test-app-cache
5147
script:
52-
- *run-phpunit-tests
53-
- *clear-test-app-cache
5448
- *run-behat-tests
5549
- *validate-openapi-v2-json
5650
- *validate-openapi-v2-yaml
5751
- *validate-openapi-v3-json
5852
- *validate-openapi-v3-yaml
5953

60-
- name: '(PHP 7.2)'
54+
- name: 'Behat (PHP 7.2)'
6155
php: '7.2'
6256
before_install:
6357
- *enable-mongodb-php-extension
6458
- *disable-xdebug-php-extension
6559
- *disable-php-memory-limit
66-
- *add-composer-bin-dir-to-path
6760
install:
6861
- *update-project-dependencies
6962
before_script:
7063
- *clear-test-app-cache
7164
script:
72-
- *run-phpunit-tests
73-
- *clear-test-app-cache
7465
- *run-behat-tests
7566
- *validate-openapi-v2-json
7667
- *validate-openapi-v2-yaml
7768
- *validate-openapi-v3-json
7869
- *validate-openapi-v3-yaml
7970

80-
- name: '(PHP 7.3)'
71+
- name: 'Behat (PHP 7.3)'
8172
php: '7.3'
8273
before_install:
8374
- *enable-mongodb-php-extension
8475
- *disable-xdebug-php-extension
8576
- *disable-php-memory-limit
86-
- *add-composer-bin-dir-to-path
8777
install:
8878
- *update-project-dependencies
8979
before_script:
9080
- *clear-test-app-cache
9181
script:
92-
- *run-phpunit-tests
93-
- *clear-test-app-cache
9482
- *run-behat-tests
9583
- *validate-openapi-v2-json
9684
- *validate-openapi-v2-yaml
9785
- *validate-openapi-v3-json
9886
- *validate-openapi-v3-yaml
9987

100-
- name: '(PHP 7.3) (lowest dependencies)'
88+
- name: 'Behat (PHP 7.4-rc)'
89+
php: '7.4snapshot'
90+
env: LEGACY=0
91+
before_install:
92+
- *enable-mongodb-php-extension
93+
- *disable-xdebug-php-extension
94+
- *disable-php-memory-limit
95+
install:
96+
- *update-project-dependencies
97+
before_script:
98+
- *clear-test-app-cache
99+
script:
100+
- vendor/bin/behat --format=progress --profile=default-no-legacy --no-interaction --colors
101+
- *validate-openapi-v2-json
102+
- *validate-openapi-v2-yaml
103+
- *validate-openapi-v3-json
104+
- *validate-openapi-v3-yaml
105+
106+
- name: 'Behat (PHP 7.3) (lowest dependencies)'
101107
php: '7.3'
102108
before_install:
103109
- *enable-mongodb-php-extension
104110
- *disable-xdebug-php-extension
105111
- *disable-php-memory-limit
106-
- *add-composer-bin-dir-to-path
107112
install:
108113
- composer update --no-progress --no-suggest --prefer-stable --prefer-lowest --ansi
109114
before_script:
110115
- *clear-test-app-cache
111116
script:
112-
- *run-phpunit-tests
113-
- *clear-test-app-cache
114117
- *run-behat-tests
115118
- *validate-openapi-v2-json
116119
- *validate-openapi-v2-yaml
117120
- *validate-openapi-v3-json
118121
- *validate-openapi-v3-yaml
119122

123+
- name: 'Behat (PHP 7.4-rc) (lowest dependencies)'
124+
php: '7.4snapshot'
125+
env: LEGACY=0
126+
before_install:
127+
- *enable-mongodb-php-extension
128+
- *disable-xdebug-php-extension
129+
- *disable-php-memory-limit
130+
install:
131+
- composer update --no-progress --no-suggest --prefer-stable --prefer-lowest --ansi
132+
before_script:
133+
- *clear-test-app-cache
134+
script:
135+
- vendor/bin/behat --format=progress --profile=default-no-legacy --no-interaction --colors
136+
- *validate-openapi-v2-json
137+
- *validate-openapi-v2-yaml
138+
- *validate-openapi-v3-json
139+
- *validate-openapi-v3-yaml
140+
120141
- php: '7.3'
121142
env: APP_ENV=postgres
122143
services:
@@ -125,7 +146,6 @@ jobs:
125146
- *enable-mongodb-php-extension
126147
- *disable-xdebug-php-extension
127148
- *disable-php-memory-limit
128-
- *add-composer-bin-dir-to-path
129149
install:
130150
- *update-project-dependencies
131151
before_script:
@@ -148,7 +168,6 @@ jobs:
148168
- *enable-mongodb-php-extension
149169
- *disable-xdebug-php-extension
150170
- *disable-php-memory-limit
151-
- *add-composer-bin-dir-to-path
152171
install:
153172
- *update-project-dependencies
154173
before_script:
@@ -171,7 +190,6 @@ jobs:
171190
- *enable-mongodb-php-extension
172191
- *disable-xdebug-php-extension
173192
- *disable-php-memory-limit
174-
- *add-composer-bin-dir-to-path
175193
install:
176194
- *update-project-dependencies
177195
before_script:
@@ -197,7 +215,6 @@ jobs:
197215
- *enable-mongodb-php-extension
198216
- *disable-xdebug-php-extension
199217
- *disable-php-memory-limit
200-
- *add-composer-bin-dir-to-path
201218
install:
202219
- *update-project-dependencies
203220
before_script:
@@ -217,7 +234,6 @@ jobs:
217234
- *enable-mongodb-php-extension
218235
- *disable-xdebug-php-extension
219236
- *disable-php-memory-limit
220-
- *add-composer-bin-dir-to-path
221237
install:
222238
- *update-project-dependencies
223239
before_script:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ It natively supports popular open formats including [JSON for Linked Data (JSON-
99
Build a working and fully-featured CRUD API in minutes. Leverage the awesome features of the tool to develop complex and
1010
high performance API-first projects. Extend or override everything you want.
1111

12+
![GitHub Actions](https://github.com/api-platform/core/workflows/CI/badge.svg)
1213
[![Travis CI](https://travis-ci.org/api-platform/core.svg?branch=master)](https://travis-ci.org/api-platform/core)
1314
[![CircleCI](https://circleci.com/gh/api-platform/core/tree/master.svg?style=shield)](https://circleci.com/gh/api-platform/core/tree/master)
1415
[![AppVeyor](https://ci.appveyor.com/api/projects/status/grwuyprts3wdqx5l/branch/master?svg=true)](https://ci.appveyor.com/project/dunglas/dunglasapibundle/branch/master)

behat.yml.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ default:
3434
symfony2: ~
3535
'Behatch\Extension': ~
3636

37+
default-no-legacy:
38+
suites:
39+
default:
40+
filters:
41+
tags: '~@postgres&&~@mongodb&&~@elasticsearch&&~@legacy'
42+
3743
postgres:
3844
suites:
3945
default: false

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,18 @@
3333
"behat/symfony2-extension": "^2.1.1",
3434
"behatch/contexts": "3.1.0",
3535
"doctrine/annotations": "^1.7",
36+
"doctrine/common": "^2.11",
3637
"doctrine/data-fixtures": "^1.2.2",
3738
"doctrine/doctrine-bundle": "^1.8",
3839
"doctrine/doctrine-cache-bundle": "^1.3.5",
3940
"doctrine/mongodb-odm": "^2.0@beta",
4041
"doctrine/mongodb-odm-bundle": "^4.0@beta",
41-
"doctrine/orm": "^2.6.3",
42+
"doctrine/orm": "^2.6.4",
4243
"elasticsearch/elasticsearch": "^6.0",
4344
"friendsofsymfony/user-bundle": "^2.2@dev",
4445
"guzzlehttp/guzzle": "^6.0",
4546
"jangregor/phpstan-prophecy": "^0.4.2",
46-
"justinrainbow/json-schema": "^5.0",
47+
"justinrainbow/json-schema": "^5.2.1",
4748
"nelmio/api-doc-bundle": "^2.13.4",
4849
"phpdocumentor/reflection-docblock": "^3.0 || ^4.0",
4950
"phpdocumentor/type-resolver": "^0.3 || ^0.4",
@@ -73,16 +74,16 @@
7374
"symfony/form": "^3.4 || ^4.0",
7475
"symfony/framework-bundle": "^4.2",
7576
"symfony/mercure-bundle": "*",
76-
"symfony/messenger": "^4.2",
77+
"symfony/messenger": "^4.2.11",
7778
"symfony/phpunit-bridge": "^4.3@dev",
78-
"symfony/routing": "^3.4 || ^4.0",
79+
"symfony/routing": "^3.4 || ^4.3",
7980
"symfony/security-bundle": "^3.4 || ^4.0",
8081
"symfony/security-core": "^3.4 || ^4.0",
8182
"symfony/twig-bundle": "^3.4 || ^4.0",
8283
"symfony/validator": "^3.4 || ^4.0",
8384
"symfony/web-profiler-bundle": "^4.2",
8485
"symfony/yaml": "^3.4 || ^4.0",
85-
"twig/twig": "^1.41 || ^2.10",
86+
"twig/twig": "^1.42.3 || ^2.10",
8687
"webonyx/graphql-php": ">=0.13 <1.0"
8788
},
8889
"conflict": {

features/integration/fos_user.feature renamed to features/legacy/fos_user.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@legacy
12
Feature: FOSUser integration
23
In order to use FOSUserBundle
34
As an API software developer

features/integration/nelmio_api_doc.feature renamed to features/legacy/nelmio_api_doc.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@legacy
12
Feature: NelmioApiDoc integration
23
In order to use NelmioApiDocBundle
34
As an API software developer

features/main/subresource.feature

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Feature: Subresource support
77
Scenario: Get subresource one to one relation
88
Given there is an answer "42" to the question "What's the answer to the Ultimate Question of Life, the Universe and Everything?"
99
When I send a "GET" request to "/questions/1/answer"
10-
And the response status code should be 200
10+
Then the response status code should be 200
1111
And the response should be in JSON
1212
And the JSON should be equal to:
1313
"""
@@ -27,7 +27,7 @@ Feature: Subresource support
2727
Scenario: Get a non existant subresource
2828
Given there is an answer "42" to the question "What's the answer to the Ultimate Question of Life, the Universe and Everything?"
2929
When I send a "GET" request to "/questions/999999/answer"
30-
And the response status code should be 404
30+
Then the response status code should be 404
3131
And the response should be in JSON
3232

3333
Scenario: Get recursive subresource one to many relation
@@ -56,7 +56,7 @@ Feature: Subresource support
5656
Scenario: Get the subresource relation collection
5757
Given there is a dummy object with a fourth level relation
5858
When I send a "GET" request to "/dummies/1/related_dummies"
59-
And the response status code should be 200
59+
Then the response status code should be 200
6060
And the response should be in JSON
6161
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
6262
And the JSON should be equal to:
@@ -132,7 +132,7 @@ Feature: Subresource support
132132

133133
Scenario: Get filtered embedded relation subresource collection
134134
When I send a "GET" request to "/dummies/1/related_dummies?name=Hello"
135-
And the response status code should be 200
135+
Then the response status code should be 200
136136
And the response should be in JSON
137137
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
138138
And the JSON should be equal to:
@@ -195,7 +195,7 @@ Feature: Subresource support
195195

196196
Scenario: Get the subresource relation item
197197
When I send a "GET" request to "/dummies/1/related_dummies/2"
198-
And the response status code should be 200
198+
Then the response status code should be 200
199199
And the response should be in JSON
200200
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
201201
And the JSON should be equal to:
@@ -254,7 +254,7 @@ Feature: Subresource support
254254

255255
Scenario: Get the embedded relation subresource item at the fourth level
256256
When I send a "GET" request to "/dummies/1/related_dummies/1/third_level/fourth_level"
257-
And the response status code should be 200
257+
Then the response status code should be 200
258258
And the response should be in JSON
259259
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
260260
And the JSON should be equal to:
@@ -272,7 +272,7 @@ Feature: Subresource support
272272
Scenario: Get offers subresource from aggregate offers subresource
273273
Given I have a product with offers
274274
When I send a "GET" request to "/dummy_products/2/offers/1/offers"
275-
And the response status code should be 200
275+
Then the response status code should be 200
276276
And the response should be in JSON
277277
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
278278
And the JSON should be equal to:
@@ -296,7 +296,7 @@ Feature: Subresource support
296296

297297
Scenario: Get offers subresource from aggregate offers subresource
298298
When I send a "GET" request to "/dummy_aggregate_offers/1/offers"
299-
And the response status code should be 200
299+
Then the response status code should be 200
300300
And the response should be in JSON
301301
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
302302
And the JSON should be equal to:
@@ -321,7 +321,7 @@ Feature: Subresource support
321321
Scenario: The recipient of the person's greetings should be empty
322322
Given there is a person named "Alice" greeting with a "hello" message
323323
When I send a "GET" request to "/people/1/sent_greetings"
324-
And the response status code should be 200
324+
Then the response status code should be 200
325325
And the response should be in JSON
326326
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
327327
And the JSON should be equal to:
@@ -411,7 +411,7 @@ Feature: Subresource support
411411

412412
Scenario: Recursive resource
413413
When I send a "GET" request to "/dummy_products/2"
414-
And the response status code should be 200
414+
Then the response status code should be 200
415415
And the response should be in JSON
416416
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
417417
And the JSON should be equal to:

0 commit comments

Comments
 (0)