mirror of
https://github.com/opdavies/glassboxx-sdk-php.git
synced 2025-02-17 22:50:48 +00:00
Add Psalm to GitHub Actions
This commit is contained in:
parent
259946d961
commit
0ed99797f5
31
.github/workflows/static-analysis.yml
vendored
Normal file
31
.github/workflows/static-analysis.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
---
|
||||||
|
name: Static analysis
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '**.php'
|
||||||
|
- '*psalm.xml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
psalm:
|
||||||
|
name: Psalm
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v1
|
||||||
|
with:
|
||||||
|
php-version: 7.4
|
||||||
|
coverage: none
|
||||||
|
|
||||||
|
- name: Cache Composer dependencies
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: vendor
|
||||||
|
key: composer-${{ hashFiles('composer.lock' )}}
|
||||||
|
|
||||||
|
- name: Run Psalm
|
||||||
|
run: make static-code-analysis
|
6
Makefile
6
Makefile
|
@ -1,6 +1,6 @@
|
||||||
.PHONY: *
|
.PHONY: *
|
||||||
|
|
||||||
static-code-analysis:
|
static-code-analysis: vendor
|
||||||
php vendor/bin/psalm --show-info=true
|
php vendor/bin/psalm --show-info=true
|
||||||
|
|
||||||
phpcs:
|
phpcs:
|
||||||
|
@ -10,3 +10,7 @@ phpunit:
|
||||||
php vendor/bin/phpunit -v --color=always --testdox tests
|
php vendor/bin/phpunit -v --color=always --testdox tests
|
||||||
|
|
||||||
test: phpunit phpcs
|
test: phpunit phpcs
|
||||||
|
|
||||||
|
vendor: composer.json
|
||||||
|
composer validate --strict
|
||||||
|
composer install
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "opdavies/glassboxx-sdk-php",
|
"name": "opdavies/glassboxx-sdk-php",
|
||||||
|
"description": "A PHP SDK for creating customers and orders in Glassboxx.",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
Loading…
Reference in a new issue