From ee385fa1d972e94a434c6f35f552135ca21d5091 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 22 Nov 2020 22:14:52 +0300 Subject: [PATCH] feat(tests): remove all tests for Endpoints and Deploy on test for now. #477 --- .github/workflows/tests.yml | 49 +------------------------------- tests/Endpoints/RegistryTest.php | 21 -------------- 2 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 tests/Endpoints/RegistryTest.php diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1ddec3e9..af717269 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,53 +1,6 @@ name: Tests on: ['push', 'pull_request'] jobs: - endpoints: - name: ENDPOINTS - 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, xdebug - tools: composer:v2 - coverage: xdebug - - - 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 }} - exclude: .git* - - .git*/** - - vendor/** - - var/** - - tests/** - - .github/** - - - name: Run Tests - run: ./vendor/bin/pest --group=endpoints - build: name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} runs-on: ${{ matrix.os }} @@ -83,4 +36,4 @@ jobs: run: composer update --${{ matrix.dependency-version }} --ignore-platform-req=php --no-interaction --no-progress - name: Run Tests - run: ./vendor/bin/pest --coverage --exclude-group=endpoints + run: ./vendor/bin/pest --coverage diff --git a/tests/Endpoints/RegistryTest.php b/tests/Endpoints/RegistryTest.php deleted file mode 100644 index 2b1d47a7..00000000 --- a/tests/Endpoints/RegistryTest.php +++ /dev/null @@ -1,21 +0,0 @@ -group('endpoints'); - -beforeEach(function() { - $this->client = new GuzzleHttp\Client(); -}); - -test('test GET /api/registry', function () { - $response = $this->client->request('GET', 'https://test.flextype.org/api/registry', [ - 'query' => [ - 'id' => 'flextype.manifest.version', - 'token' => 'e15dbc9336c924e31a5b3b4e66f96351' - ] - ]); - - $this->assertEquals('flextype.manifest.version', json_decode((string) $response->getBody(), true)['data']['key']); - $this->assertTrue(version_compare(json_decode((string) $response->getBody(), true)['data']['value'], '0.0.0', '>=' ) >= 0); -});