From 60b784eaf01b8ad1aa66a246ca88330a9ad89f3c Mon Sep 17 00:00:00 2001 From: Malabya Date: Mon, 14 Oct 2024 15:25:23 +0530 Subject: [PATCH] Lint theme on Push. --- .github/workflows/ci.yml | 66 +++++++++++----------------------------- 1 file changed, 17 insertions(+), 49 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d324a77..d0e6500 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,56 +1,24 @@ name: CI - -on: - push: - branches: [ 10.x ] - pull_request: - branches: [ 10.x ] - workflow_dispatch: - -env: - COMPOSER_MEMORY_LIMIT: -1 - SIMPLETEST_DB: sqlite://tmp/site.sqlite - SIMPLETEST_BASE_URL: "http://127.0.0.1:8080" +on: [push] jobs: build: - runs-on: 'ubuntu-latest' - strategy: - fail-fast: false - matrix: - os: [ ubuntu ] - php-versions: ['8.2', '8.3'] - + name: Test + runs-on: ubuntu-latest steps: - - name: Dump matrix context - env: - MATRIX_CONTEXT: ${{ toJSON(matrix) }} - run: echo "$MATRIX_CONTEXT" - - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - - name: Setup PHP - uses: shivammathur/setup-php@v2 + - name: Set Node.js 16.x + uses: actions/setup-node@v3 with: - php-version: ${{ matrix.php-versions }} - extensions: gd, pdo_sqlite - - - name: Update composer - run: composer --verbose self-update --${{ matrix.composer-channel }} - - - name: Dump composer version - run: composer --version - - - name: Validate composer.json - run: composer validate - - - name: Install dependencies - run: composer install --ansi - - - name: Install site - run: php -d max_execution_time=0 web/core/scripts/drupal install demo_umami - - - run: ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL & - - - run: until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null + node-version: 16.x + - name: Run install + uses: borales/actions-yarn@v4 + with: + cmd: install + dir: 'web/themes/custom/demo' + - name: Lint theme + uses: borales/actions-yarn@v4 + with: + cmd: lint + dir: 'web/themes/custom/demo'