From bec532a1549058630f78722f826beeec8090b0e5 Mon Sep 17 00:00:00 2001 From: gpanos Date: Tue, 16 Jun 2020 18:28:43 +0200 Subject: [PATCH] Create tests.yml --- .github/workflows/tests.yml | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 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..89ae3b5 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,44 @@ +name: tests + +on: + push: + pull_request: + +jobs: + tests: + + runs-on: ubuntu-latest + + strategy: + matrix: + php: [7.4, 7.3, 7.2] + laravel: [7.*, 6.*, 5.8.*] + + name: P${{ matrix.php }} - L${{ matrix.laravel }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip + coverage: none + + - name: Install dependencies + run: composer install --no-scripts + + - name: Execute tests + run: vendor/bin/phpunit --verbose + env: + PWINTY_API_KEY: ${{secrets.PWINTY_API_KEY}} + PWINTY_MERCHANT_ID: ${{secrets.PWINTY_MERCHANT_ID}} + PWINTY_SKU: ${{secrets.PWINTY_SKU}}