From a09adcf59931d7c40d4e5c33fc74591ff877bc9f Mon Sep 17 00:00:00 2001 From: arp Date: Mon, 31 Aug 2020 14:21:22 +0200 Subject: [PATCH 1/7] deleted scrutinizer conf --- scrutinizer.yml.old | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 scrutinizer.yml.old diff --git a/scrutinizer.yml.old b/scrutinizer.yml.old deleted file mode 100644 index abe844740e..0000000000 --- a/scrutinizer.yml.old +++ /dev/null @@ -1,13 +0,0 @@ -build: - environment: - php: - version: 7.3 - nodes: - analysis: - tests: - override: - - php-scrutinizer-run -checks: - php: - code_rating: true - duplication: true From 034a1d5c715e7230bca8abe31e1e630536ec2ac6 Mon Sep 17 00:00:00 2001 From: arp Date: Mon, 31 Aug 2020 16:00:20 +0200 Subject: [PATCH 2/7] added the bundle tests in a separate workflow --- .github/workflows/deploy.yml | 6 +- .github/workflows/doc_generation.yml | 37 ++++++++++++ .github/workflows/test_dependancies.yml | 78 +++++++++++++++++++++++++ 3 files changed, 118 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/doc_generation.yml create mode 100644 .github/workflows/test_dependancies.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2cde3c90b6..9c6b77322e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,9 +3,9 @@ #name: "Deploy" #on: - create: - tags: - - v.* +# create: +# tags: +# - v.* #jobs: \ No newline at end of file diff --git a/.github/workflows/doc_generation.yml b/.github/workflows/doc_generation.yml new file mode 100644 index 0000000000..8a8e4f7ade --- /dev/null +++ b/.github/workflows/doc_generation.yml @@ -0,0 +1,37 @@ +#todo: finish doc generation + +name: "Doc generation" + +on: + push: + branches: + - master + +jobs: + + doc-generation: + + name: "Doc generation" + + steps: + + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Setup NodeJS" + uses: actions/setup-node@v1 + with: + node-version: '12.x' + + - name: "Update git config" + run: git config --global user.name "${GH_NAME}" && git config --global user.email "${GH_EMAIL}" && echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc + + - name: "Yarn install" + run: yarn install + working-directory: "website" + + - name: "Push the new doc" + run: GIT_USER="${GH_NAME}" yarn run publish-gh-pages + working-directory: "website" + + \ No newline at end of file diff --git a/.github/workflows/test_dependancies.yml b/.github/workflows/test_dependancies.yml new file mode 100644 index 0000000000..726685f020 --- /dev/null +++ b/.github/workflows/test_dependancies.yml @@ -0,0 +1,78 @@ +# test for breaking changes on the different bundle projects + +name: "Test dependancies" + +on: + - "pull_request" + - "push" + +jobs: + + symfony-test: + name: "Test symfony bundle" + runs-on: "ubuntu-latest" + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "copy the project" + run: rsync -av . tests/dependencies/copy/ --exclude tests --exclude vendor + + - name: "Clone the bundle project" + run: git clone https://github.com/thecodingmachine/graphqlite-bundle.git + working-directory: "tests/dependencies" + + - name: "edit the composer.json" + run: php ./makeComposerLocal.php graphqlite-bundle/composer.json + working-directory: "tests/dependencies" + + - name: "install dependancies" + run: composer install + working-directory: "tests/dependencies/graphqlite-bundle" + + + universal-service-provider-test: + name: "Test graphqlite-universal-service-provider" + runs-on: "ubuntu-latest" + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "copy the project" + run: rsync -av . tests/dependencies/copy/ --exclude tests --exclude vendor + + - name: "Clone the bundle project" + run: git clone https://github.com/thecodingmachine/graphqlite-universal-service-provider.git + working-directory: "tests/dependencies" + + - name: "edit the composer.json" + run: php ./makeComposerLocal.php graphqlite-universal-service-provider/composer.json + working-directory: "tests/dependencies" + + - name: "install dependancies" + run: composer install + working-directory: "tests/dependencies/graphqlite-universal-service-provider" + + + graphqlite-test: + name: "Test graphqlite-laravel" + runs-on: "ubuntu-latest" + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "copy the project" + run: rsync -av . tests/dependencies/copy/ --exclude tests --exclude vendor + + - name: "Clone the bundle project" + run: git clone https://github.com/thecodingmachine/graphqlite-laravel.git + working-directory: "tests/dependencies" + + - name: "edit the composer.json" + run: php ./makeComposerLocal.php graphqlite-laravel/composer.json + working-directory: "tests/dependencies" + + - name: "install dependancies" + run: composer install + working-directory: "tests/dependencies/graphqlite-laravel" + \ No newline at end of file From f445ff0c8b27075c0d78de8f9f1d1bcaa739a9c4 Mon Sep 17 00:00:00 2001 From: arp Date: Tue, 1 Sep 2020 13:40:47 +0200 Subject: [PATCH 3/7] fixed the makeComposerLocal script --- .github/workflows/deploy.yml | 11 ----------- .github/workflows/test_dependancies.yml | 1 + tests/dependencies/makeComposerLocal.php | 16 +++++++++++----- 3 files changed, 12 insertions(+), 16 deletions(-) delete mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 9c6b77322e..0000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,11 +0,0 @@ -#todo: create deploy build - -#name: "Deploy" - -#on: -# create: -# tags: -# - v.* - -#jobs: - \ No newline at end of file diff --git a/.github/workflows/test_dependancies.yml b/.github/workflows/test_dependancies.yml index 726685f020..2dd13652f7 100644 --- a/.github/workflows/test_dependancies.yml +++ b/.github/workflows/test_dependancies.yml @@ -1,4 +1,5 @@ # test for breaking changes on the different bundle projects +#todo: verify this always works name: "Test dependancies" diff --git a/tests/dependencies/makeComposerLocal.php b/tests/dependencies/makeComposerLocal.php index c99e2a588c..c2fe7e3096 100755 --- a/tests/dependencies/makeComposerLocal.php +++ b/tests/dependencies/makeComposerLocal.php @@ -1,17 +1,23 @@ #!/bin/env php 'path', 'url' => '../copy/' ] ]; -$composer['require']['thecodingmachine/graphqlite'] = '4.0.x-dev'; +$composerBundle['require']['thecodingmachine/graphqlite'] = $masterAlias; -file_put_contents($file, json_encode($composer)); +file_put_contents($composerBundlePath, json_encode($composerBundle)); \ No newline at end of file From 373524c06f39deed75d14bb2aa9198615b742a81 Mon Sep 17 00:00:00 2001 From: arp Date: Tue, 1 Sep 2020 14:59:31 +0200 Subject: [PATCH 4/7] update an env variable name and some texts --- .github/workflows/doc_generation.yml | 7 +++---- .github/workflows/test_dependancies.yml | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/doc_generation.yml b/.github/workflows/doc_generation.yml index 8a8e4f7ade..4fc5f6f4a4 100644 --- a/.github/workflows/doc_generation.yml +++ b/.github/workflows/doc_generation.yml @@ -1,6 +1,5 @@ -#todo: finish doc generation - -name: "Doc generation" +# Generate the complete documentation then upload to the website under the master section +name: "Doc generation on master" on: push: @@ -24,7 +23,7 @@ jobs: node-version: '12.x' - name: "Update git config" - run: git config --global user.name "${GH_NAME}" && git config --global user.email "${GH_EMAIL}" && echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc + run: git config --global user.name "${GH_NAME}" && git config --global user.email "${GH_EMAIL}" && echo "machine github.com login ${GH_NAME} password ${GITHUB_TOKEN}" > ~/.netrc - name: "Yarn install" run: yarn install diff --git a/.github/workflows/test_dependancies.yml b/.github/workflows/test_dependancies.yml index 2dd13652f7..358e67f7f5 100644 --- a/.github/workflows/test_dependancies.yml +++ b/.github/workflows/test_dependancies.yml @@ -1,7 +1,8 @@ # test for breaking changes on the different bundle projects #todo: verify this always works +#todo: use a matrix syntax? -name: "Test dependancies" +name: "Test the bundles' dependancies" on: - "pull_request" From 96127d0d5d63ee083edef2bb50698f1fb163c1f0 Mon Sep 17 00:00:00 2001 From: arp Date: Tue, 1 Sep 2020 15:04:05 +0200 Subject: [PATCH 5/7] remove the old travis config --- travis.yml.old | 97 -------------------------------------------------- 1 file changed, 97 deletions(-) delete mode 100644 travis.yml.old diff --git a/travis.yml.old b/travis.yml.old deleted file mode 100644 index c72f92338b..0000000000 --- a/travis.yml.old +++ /dev/null @@ -1,97 +0,0 @@ -language: php -cache: - directories: - - $HOME/.composer/cache - - .php_cs -jobs: - include: - - stage: test - php: 7.3 - env: PREFER_LOWEST="" - before_script: - - &composerupdate - composer update --prefer-dist $PREFER_LOWEST - script: - - &phpunit - "./vendor/bin/phpunit" - - composer phpstan - - composer cs-check - after_script: - - travis_retry php vendor/bin/php-coveralls -v - - stage: test - php: 7.4 - env: PREFER_LOWEST="" - before_script: - - *composerupdate - script: - - *phpunit - - stage: test - php: 7.2 - env: PREFER_LOWEST="" - before_script: - - *composerupdate - script: - - *phpunit - - stage: test - php: 7.2 - env: PREFER_LOWEST="--prefer-lowest" - before_script: - - *composerupdate - script: - - *phpunit - # Test bundle - - stage: test_dependencies - php: 7.3 - env: PREFER_LOWEST="" - before_script: - - mkdir -p tests/dependencies - - rsync -av . tests/dependencies/copy/ --exclude tests --exclude vendor - - cd tests/dependencies - - git clone https://github.com/thecodingmachine/graphqlite-bundle.git - - php ./makeComposerLocal.php graphqlite-bundle/composer.json - - cd graphqlite-bundle - - composer install - script: - - vendor/bin/phpunit - # Test graphqlite-universal-service-provider - - stage: test_dependencies - php: 7.3 - env: PREFER_LOWEST="" - before_script: - - mkdir -p tests/dependencies - - rsync -av . tests/dependencies/copy/ --exclude tests --exclude vendor - - cd tests/dependencies - - git clone https://github.com/thecodingmachine/graphqlite-universal-service-provider.git - - php ./makeComposerLocal.php graphqlite-universal-service-provider/composer.json - - cd graphqlite-universal-service-provider - - composer install - script: - - vendor/bin/phpunit - # Test graphqlite-laravel - - stage: test_dependencies - php: 7.3 - env: PREFER_LOWEST="" - before_script: - - mkdir -p tests/dependencies - - rsync -av . tests/dependencies/copy/ --exclude tests --exclude vendor - - cd tests/dependencies - - git clone https://github.com/thecodingmachine/graphqlite-laravel.git - - php ./makeComposerLocal.php graphqlite-laravel/composer.json - - cd graphqlite-laravel - - composer install - script: - - vendor/bin/phpunit - - stage: doc - if: branch = master AND type = push - name: "Doc generation" - language: node_js - node_js: 8 - cache: - yarn: true - script: - - git config --global user.name "${GH_NAME}" - - git config --global user.email "${GH_EMAIL}" - - echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc - - cd website && yarn install && GIT_USER="${GH_NAME}" yarn run publish-gh-pages - allow_failures: - - stage: test_dependencies From 2f67be4bee80b929ece6e93a42af1182ea597268 Mon Sep 17 00:00:00 2001 From: arp Date: Tue, 1 Sep 2020 15:06:13 +0200 Subject: [PATCH 6/7] fixed some typos --- .github/workflows/test_dependancies.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test_dependancies.yml b/.github/workflows/test_dependancies.yml index 358e67f7f5..c0207b1f3e 100644 --- a/.github/workflows/test_dependancies.yml +++ b/.github/workflows/test_dependancies.yml @@ -1,8 +1,7 @@ # test for breaking changes on the different bundle projects -#todo: verify this always works #todo: use a matrix syntax? -name: "Test the bundles' dependancies" +name: "Test the bundles' dependencies" on: - "pull_request" From 6bd9c548100f1f05807878430b9dc0e5e6fe7003 Mon Sep 17 00:00:00 2001 From: arp Date: Tue, 1 Sep 2020 15:14:07 +0200 Subject: [PATCH 7/7] updated the README badges --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 38a3780bb2..45ab2ce9de 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,6 @@ Want to learn more? Head to the [documentation](https://graphqlite.thecodingmach [![Total Downloads](https://poser.pugx.org/thecodingmachine/graphqlite/downloads)](https://packagist.org/packages/thecodingmachine/graphqlite) [![Latest Unstable Version](https://poser.pugx.org/thecodingmachine/graphqlite/v/unstable)](https://packagist.org/packages/thecodingmachine/graphqlite) [![License](https://poser.pugx.org/thecodingmachine/graphqlite/license)](https://packagist.org/packages/thecodingmachine/graphqlite) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/thecodingmachine/graphqlite/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/thecodingmachine/graphqlite/?branch=master) -[![Build Status](https://travis-ci.org/thecodingmachine/graphqlite.svg?branch=master)](https://travis-ci.org/thecodingmachine/graphqlite) -[![Coverage Status](https://coveralls.io/repos/thecodingmachine/graphqlite/badge.svg?branch=master&service=github)](https://coveralls.io/github/thecodingmachine/graphqlite?branch=master) +[![Continuous Integration](https://github.com/thecodingmachine/graphqlite/workflows/Continuous%20Integration/badge.svg)](https://github.com/thecodingmachine/graphqlite/actions) +[![codecov](https://codecov.io/gh/thecodingmachine/graphqlite/branch/master/graph/badge.svg)](https://codecov.io/gh/thecodingmachine/graphqlite) +