From 0556b5bd373a509095c6cf3bbfc41c830bb14a59 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 21 Nov 2020 23:38:49 +0300 Subject: [PATCH] feat(tests): upd tests for endpoints #477 --- .github/workflows/tests.yml | 55 +++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7c5eded4..ba9183db 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,48 @@ name: Tests on: ['push', 'pull_request'] jobs: + endpoints: + name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + php: ['7.3'] + dependency-version: [prefer-stable] + + steps: + - name: Get latest code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: fileinfo, spl, json, dom, mbstring + tools: composer:v2 + coverage: none + + - name: Setup Problem Matches + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Install PHP 7 dependencies + run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress + + - name: Deploy on Test + uses: SamKirkland/FTP-Deploy-Action@4.0.0 + with: + server: ${{ secrets.FTP_HOST }} + port: 21 + username: ${{ secrets.FTP_USERNAME }} + password: ${{ secrets.FTP_PASSWORD }} + server-dir: ${{ secrets.FTP_DIR }} + log-level: verbose + + - name: Run Tests + run: ./vendor/bin/pest --group=endpoints + build: name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} runs-on: ${{ matrix.os }} @@ -35,16 +77,5 @@ jobs: if: "matrix.php >= 8" run: composer update --${{ matrix.dependency-version }} --ignore-platform-req=php --no-interaction --no-progress - - name: Deploy on Test - if: "matrix.os == 'ubuntu-latest' && matrix.php == 7.3" - uses: SamKirkland/FTP-Deploy-Action@4.0.0 - with: - server: ${{ secrets.FTP_HOST }} - port: 21 - username: ${{ secrets.FTP_USERNAME }} - password: ${{ secrets.FTP_PASSWORD }} - server-dir: ${{ secrets.FTP_DIR }} - log-level: verbose - - name: Run Tests - run: ./vendor/bin/pest + run: ./vendor/bin/pest --exclude-group=endpoints