Skip to content

Commit cfe51e4

Browse files
committed
chore: introduces Makefile for consistent command usage
1 parent 9217258 commit cfe51e4

File tree

3 files changed

+152
-102
lines changed

3 files changed

+152
-102
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
- name: install composer
1818
run: composer self-update
1919
- name: install dependencies
20-
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
20+
run: make install
2121
- name: lint
22-
run: composer lint
22+
run: make lint
2323
run-tests:
2424
runs-on: ubuntu-20.04
2525
strategy:
@@ -43,8 +43,8 @@ jobs:
4343
- name: install composer
4444
run: composer self-update
4545
- name: install dependencies
46-
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
46+
run: make install
4747
- name: test with phpunit on ${{ matrix.phpversion }}
48-
run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 composer test
48+
run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make test
4949
- name: Security scan
50-
run: composer scan
50+
run: make scan

Makefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## help - Display help about make targets for this Makefile
2+
help:
3+
@cat Makefile | grep '^## ' --color=never | cut -c4- | sed -e "`printf 's/ - /\t- /;'`" | column -s "`printf '\t'`" -t
4+
5+
## clean - Cleans the project
6+
clean:
7+
rm -rf vendor clover.xml clover.html bin .phpunit.cache
8+
9+
## fix - Fix linting errors
10+
fix:
11+
composer fix
12+
13+
## install - Install dependencies
14+
install:
15+
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
16+
17+
## lint - Lint the project
18+
lint:
19+
composer lint
20+
21+
## release - Cuts a release for the project on GitHub (requires GitHub CLI)
22+
# tag = The associated tag title of the release
23+
release:
24+
gh release create ${tag}
25+
26+
## scan - Runs security analysis on the project
27+
scan:
28+
composer scan
29+
30+
## test - Test the project
31+
test:
32+
composer test
33+
34+
## update - Update dependencies
35+
update:
36+
composer update
37+
38+
.PHONY: help clean fix install lint release scan test update

0 commit comments

Comments
 (0)