Skip to content

Commit e7cd3ea

Browse files
committed
WIP
1 parent 5c41924 commit e7cd3ea

8 files changed

Lines changed: 28 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "CI suite"
1+
name: "Tests"
22

33
on: [push, pull_request]
44

@@ -19,7 +19,8 @@ jobs:
1919
with:
2020
php-version: ${{ matrix.php }}
2121
extensions: bcmath
22+
ini-values: bcmath.scale=0
2223
coverage: none
2324

24-
- run: composer install
25-
- run: composer ci
25+
- run: make install
26+
- run: make ci

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.DEFAULT_GOAL := help
2+
3+
help:
4+
@printf "\033[33mUsage:\033[0m\n make [target] [arg=\"val\"...]\n\n\033[33mTargets:\033[0m\n"
5+
@grep -E '^[-a-zA-Z0-9_\.\/]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-15s\033[0m %s\n", $$1, $$2}'
6+
7+
.PHONY: install
8+
install: vendor ## Installs all project dependencies
9+
10+
vendor: composer.json $(wildcard composer.lock)
11+
@composer install
12+
13+
.PHONY: ci
14+
ci: phplint tester ## Runs complete CI suite
15+
16+
.PHONY: phplint
17+
phplint:
18+
@php vendor/bin/parallel-lint Simplex/ tests/ example.php --colors
19+
20+
.PHONY: tester
21+
tester:
22+
@php vendor/bin/tester -i
23+
@php vendor/bin/tester tests -C --colors \
24+
|| php vendor/bin/tester tests/ -p php -c $(shell php -r 'echo php_ini_loaded_file();') --colors

composer.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,5 @@
1919
},
2020
"autoload": {
2121
"classmap": ["Simplex/"]
22-
},
23-
"scripts": {
24-
"ci": [
25-
"@phplint",
26-
"@tester"
27-
],
28-
"phplint": "parallel-lint Simplex/ tests/ example.php --colors",
29-
"tester": "tester tests/ --colors"
3022
}
3123
}
File renamed without changes.

0 commit comments

Comments
 (0)