Skip to content

Commit

Permalink
Merge pull request #41 from hypothesis/update-ci
Browse files Browse the repository at this point in the history
Update project dependencies and CI workflow
  • Loading branch information
acelaya authored Jan 23, 2024
2 parents 2e87c21 + 5fb681b commit f291d09
Show file tree
Hide file tree
Showing 6 changed files with 366 additions and 63 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Continuous integration
on:
pull_request:
workflow_call:
workflow_dispatch:
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Cache the vendor dir
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-${{ matrix.php-version }}-vendor-${{ hashFiles('composer.lock') }}
- name: Install
run: composer install --no-interaction --prefer-dist
- name: Lint
run: composer lint
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

22 changes: 14 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@
},
"type": "wordpress-plugin",
"license": "BSD-2-Clause",
"require": {},
"require": {
"php": ">=7.4"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.0",
"wp-coding-standards/wpcs": "^2.0"
"squizlabs/php_codesniffer": "^3.8",
"wp-coding-standards/wpcs": "^3.0"
},
"scripts": {
"test": "@standards",
"standards": [
"vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs",
"vendor/bin/phpcs --standard=phpcs.xml --extensions=php ."
]
"test": "@lint",
"lint": "phpcs --standard=phpcs.xml --extensions=php .",
"checkformatting": "@lint",
"format": "phpcbf --extensions=php ."
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading

0 comments on commit f291d09

Please sign in to comment.