From 0250970de0d7494b1c0c1e07bc61c4854de1157b Mon Sep 17 00:00:00 2001 From: Phan An Date: Wed, 10 Mar 2021 10:18:48 +0100 Subject: [PATCH] feat (build): use dedicated GitHub actions to install packages (#1289) --- .github/workflows/e2e.yml | 24 +++++++++++++----------- .github/workflows/unit.yml | 7 +++++-- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3c79568e..72bece61 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -16,19 +16,21 @@ jobs: with: php-version: 7.4 tools: composer:v2 + extensions: pdo_sqlite - name: Install PHP dependencies - run: | - composer install --prefer-dist --no-interaction --no-scripts --no-progress - php artisan key:generate --quiet - - name: Set up Node - uses: actions/setup-node@v2 + uses: ramsey/composer-install@v1 with: - node-version: 14 - - name: Install submodule dependencies - working-directory: ./resources/assets - run: yarn install - - name: Yarn install and lint - run: yarn install && yarn lint + composer-options: --prefer-dist + - name: Generate app key + run: php artisan key:generate --quiet + - name: Install JavaScript dependencies + uses: bahmutov/npm-install@v1 + with: + working-directory: | + ./resources/assets + . + - name: Lint + run: yarn lint - name: Run E2E tests uses: cypress-io/github-action@v2 with: diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index f6c4050d..7bdd8738 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -15,8 +15,11 @@ jobs: php-version: ${{ matrix.php-version }} tools: composer:v2 coverage: xdebug - - name: Install dependencies - run: composer install --prefer-dist --no-interaction --no-scripts --no-progress + extensions: pdo_sqlite, zip, gd + - name: Install PHP dependencies + uses: ramsey/composer-install@v1 + with: + composer-options: --prefer-dist - name: Generate app key run: php artisan key:generate --quiet - name: Run code style checker