Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/test-eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: ESLint Tests

on:
push:
branches:
- master
paths:
- 'packages/eslint-config-humanmade/**'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/test-eslint.yml'
pull_request:
paths:
- 'packages/eslint-config-humanmade/**'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/test-eslint.yml'

permissions:
contents: read

jobs:
test:
name: ESLint / Node ${{ matrix.node-version }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version:
- 20
- 22
- 24

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install root dependencies
run: npm ci

- name: Install ESLint package dependencies
working-directory: packages/eslint-config-humanmade
run: npm ci

- name: Run ESLint tests
run: npm run test:eslint
67 changes: 67 additions & 0 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: PHP Tests

on:
push:
branches:
- master
paths:
- 'HM/**'
- 'HM-Minimum/**'
- 'tests/**'
- 'composer.json'
- 'phpunit.xml.dist'
- 'ruleset.xml'
- '.github/workflows/test-php.yml'
pull_request:
paths:
- 'HM/**'
- 'HM-Minimum/**'
- 'tests/**'
- 'composer.json'
- 'phpunit.xml.dist'
- 'ruleset.xml'
- '.github/workflows/test-php.yml'

permissions:
contents: read

jobs:
test:
name: PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- '8.2'
- '8.3'

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: ${{ matrix.php-version }}
coverage: none

- name: Cache Composer dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/composer/files
key: composer-${{ matrix.php-version }}-${{ hashFiles('composer.json') }}
restore-keys: |
composer-${{ matrix.php-version }}-
composer-

- name: Install Composer dependencies
# Ignore platform requirements as PHPUnit may require a higher PHP version than the minimum supported.
run: composer install --ignore-platform-reqs

- name: Run PHPUnit (AllSniffs)
# Pass settings via CLI to avoid PHPUnit config file compatibility issues across versions.
run: vendor/bin/phpunit --no-configuration --bootstrap=tests/bootstrap.php --dont-report-useless-tests tests/AllSniffs.php

- name: Run PHPUnit (FixtureTests)
run: vendor/bin/phpunit --no-configuration --bootstrap=tests/bootstrap.php --dont-report-useless-tests tests/FixtureTests.php
52 changes: 52 additions & 0 deletions .github/workflows/test-stylelint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Stylelint Tests

on:
push:
branches:
- master
paths:
- 'packages/stylelint-config/**'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/test-stylelint.yml'
pull_request:
paths:
- 'packages/stylelint-config/**'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/test-stylelint.yml'

permissions:
contents: read

jobs:
test:
name: Stylelint / Node ${{ matrix.node-version }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version:
- 20
- 22
- 24

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install root dependencies
run: npm ci

- name: Install Stylelint package dependencies
working-directory: packages/stylelint-config
run: npm ci

- name: Run Stylelint tests
run: npm run test:stylelint
96 changes: 0 additions & 96 deletions .travis.yml

This file was deleted.