Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
uestla committed Feb 12, 2023
1 parent 5c41924 commit 271bd54
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 11 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CI suite"
name: "Tests"

on: [push, pull_request]

Expand All @@ -19,7 +19,8 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: bcmath
ini-values: bcmath.scale=0
coverage: none

- run: composer install
- run: composer ci
- run: make install
- run: make ci
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.DEFAULT_GOAL := help

help:
@printf "\033[33mUsage:\033[0m\n make [target] [arg=\"val\"...]\n\n\033[33mTargets:\033[0m\n"
@grep -E '^[-a-zA-Z0-9_\.\/]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-15s\033[0m %s\n", $$1, $$2}'

.PHONY: install
install: vendor ## Installs all project dependencies

vendor: composer.json $(wildcard composer.lock)
@composer install

.PHONY: ci
ci: phplint tester ## Runs complete CI suite

.PHONY: phplint
phplint:
@php vendor/bin/parallel-lint Simplex/ tests/ example.php --colors

.PHONY: tester
tester:
@php vendor/bin/tester -i
@php --info
@php vendor/bin/tester tests -C --colors \
|| php vendor/bin/tester tests/ -p php -c $(shell php -r 'echo php_ini_loaded_file();') --colors
8 changes: 0 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,5 @@
},
"autoload": {
"classmap": ["Simplex/"]
},
"scripts": {
"ci": [
"@phplint",
"@tester"
],
"phplint": "parallel-lint Simplex/ tests/ example.php --colors",
"tester": "tester tests/ --colors"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 271bd54

Please sign in to comment.