From a90a7f6e1bac616e3400f60e390d6fae7c66ee92 Mon Sep 17 00:00:00 2001 From: Andrea Giannantonio Date: Tue, 5 Jan 2021 10:30:13 +0100 Subject: [PATCH] chore(ci): add github actions CI --- .github/workflows/tests.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..a21bef0 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,38 @@ +name: Tests + +on: + push: + pull_request: + +jobs: + run: + runs-on: ubuntu-latest + + strategy: + matrix: + php-versions: ['7.3', '7.4', '8.0'] + composer-stability: [ 'prefer-lowest', 'prefer-stable' ] + + name: PHP ${{ matrix.php }} - ${{ matrix.stability }} + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: composer:v2 + + - name: Validate composer.json + run: composer validate + + - name: Install dependencies + run: composer update --prefer-source --no-interaction --${{ matrix.stability }} + + - name: Run phpspec tests + run: ./bin/phpspec run --format=dot + + - name: Run behat tests + run: ./bin/behat