Skip to content

Commit

Permalink
Lint theme on Push.
Browse files Browse the repository at this point in the history
  • Loading branch information
malabya committed Oct 14, 2024
1 parent b1f121e commit 60b784e
Showing 1 changed file with 17 additions and 49 deletions.
66 changes: 17 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 60b784e

Please sign in to comment.