Skip to content

Commit 1b9110d

Browse files
committed
Adding GraphQLite bundle tests in Travis.
The idea is to check if the bundle is broken was modifications done to GraphQLite core. The tests are allowed to fail as breaking changes may happen (we just need to be notified and apply fixes quickly after)
1 parent 0bca91f commit 1b9110d

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ website/build/
1515
website/yarn.lock
1616
website/node_modules
1717
website/i18n/*
18+
19+
/tests/dependencies/graphqlite-bundle/

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ jobs:
3737
- *composerupdate
3838
script:
3939
- *phpunit
40+
- stage: test_dependencies
41+
php: 7.3
42+
env: PREFER_LOWEST=""
43+
before_script:
44+
- mkdir -p tests/dependencies
45+
- rsync -av . tests/dependencies/copy/ --exclude tests --exclude vendor
46+
- cd tests/dependencies
47+
- git clone https://github.com/thecodingmachine/graphqlite-bundle.git
48+
- ./makeComposerLocal.php graphqlite-bundle/composer.json
49+
- cd graphqlite-bundle
50+
- composer install
51+
script:
52+
- vendor/bin/phpunit
4053
- stage: doc
4154
if: branch = master AND type = push
4255
name: "Doc generation"
@@ -49,3 +62,6 @@ jobs:
4962
- git config --global user.email "${GH_EMAIL}"
5063
- echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc
5164
- cd website && yarn install && GIT_USER="${GH_NAME}" yarn run publish-gh-pages
65+
matrix:
66+
allow_failures:
67+
- stage: test_dependencies
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/env php
2+
<?php
3+
4+
$file = $argv[1];
5+
6+
$composer = json_decode(file_get_contents($file), true);
7+
8+
$composer['repositories'] = [
9+
[
10+
'type' => 'path',
11+
'url' => '../copy/'
12+
]
13+
];
14+
15+
file_put_contents($file, json_encode($composer));

0 commit comments

Comments
 (0)