From 279fcf2a8f84046a56c8ff5426f6dac7bbea8870 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 9 Jul 2020 18:38:06 +0100 Subject: [PATCH] wip --- .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..078c464 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +--- +name: CI + +on: + pull_request: + push: + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + php-version: + - '5.6' + - '7.0' + - '7.1' + - '7.2' + dependencies: + - lowest + - locked + - highest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + extensions: mbstring + coverage: none + + - name: "Install lowest dependencies from composer.json" + if: "matrix.dependencies == 'lowest'" + run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest" + + - name: "Install locked dependencies from composer.lock" + if: "matrix.dependencies == 'locked'" + run: "composer install --no-interaction --no-progress --no-suggest" + + - name: "Install highest dependencies from composer.json" + if: "matrix.dependencies == 'highest'" + run: "composer update --no-interaction --no-progress --no-suggest" + + - name: Run the tests + run: vendor/bin/phpunit --colors=always --testdox