Skip to content

Commit

Permalink
Merge pull request #35 from kronostechnologies/psalm
Browse files Browse the repository at this point in the history
Psalm
  • Loading branch information
etremblay authored Mar 10, 2021
2 parents f630a6d + 8c3e034 commit 39785a9
Show file tree
Hide file tree
Showing 34 changed files with 2,794 additions and 1,083 deletions.
10 changes: 9 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
version: 2.1

variables:
composer_cache_version: &composer_cache_version v2

orbs:
eq: equisoft/[email protected].4
eq: equisoft/[email protected].15

workflows:
version: 2
build_and_deploy:
jobs:
- eq/phpunit:
cache-version: *composer_cache_version
checkout: true
- eq/psalm :
extra-build-args : --no-diff
composer-cache-version: *composer_cache_version
checkout : true
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
BASE_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
OS_TYPE := $(shell uname -s)
USER_ID := $(shell id -u)
GROUP_ID := $(shell id -g)
MKDIR_P = mkdir -p
DOCKER_PHP = docker run -it --rm \
-v $(BASE_DIR):/home/circleci/project \
-v ~/.cache:/home/circleci/.cache --user "${USER_ID}:${GROUP_ID}" \
--workdir /home/circleci/project \
-e HOME=/home/circleci \
ghcr.io/kronostechnologies/php:7.2-node

.PHONY: all setup check psalm test

all: setup check test

setup:
@composer install

check: psalm

psalm:
@${DOCKER_PHP} ./vendor/bin/psalm $(PSALM_ARGS)

test:
@./vendor/bin/phpunit
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
"sentry/sentry": "<2.0",
"graylog2/gelf-php": "~1.5",
"fluent/logger": "^1.0",
"phpunit/phpunit": "^8.0"
}
"phpunit/phpunit": "^8.5",
"vimeo/psalm": "^4.6"
},
"config": {
"platform": {
"php": "7.2"
}
}
}
Loading

0 comments on commit 39785a9

Please sign in to comment.