diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 2cde3c90b6..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/doc_generation.yml b/.github/workflows/doc_generation.yml new file mode 100644 index 0000000000..4fc5f6f4a4 --- /dev/null +++ b/.github/workflows/doc_generation.yml @@ -0,0 +1,36 @@ +# Generate the complete documentation then upload to the website under the master section +name: "Doc generation on master" + +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 ${GITHUB_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..c0207b1f3e --- /dev/null +++ b/.github/workflows/test_dependancies.yml @@ -0,0 +1,79 @@ +# test for breaking changes on the different bundle projects +#todo: use a matrix syntax? + +name: "Test the bundles' dependencies" + +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 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) + 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 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 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