From 45f931fd46a556fc1ca88f2e6c955a4a152b7481 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 30 Jan 2026 11:31:07 -0700 Subject: [PATCH 1/3] chore: swap makefile for justfile --- .github/workflows/ci.yml | 3 ++ Makefile | 68 ---------------------------------------- README.md | 20 ++++++------ justfile | 62 ++++++++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 78 deletions(-) delete mode 100644 Makefile create mode 100644 justfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b897172e..212dc6b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + - uses: extractions/setup-just@v3 - uses: shivammathur/setup-php@v2 with: php-version: '8.5' @@ -25,6 +26,7 @@ jobs: phpversion: ['8.1', '8.2', '8.3', '8.4', '8.5'] steps: - uses: actions/checkout@v6 + - uses: extractions/setup-just@v3 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.phpversion }} @@ -52,6 +54,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + - uses: extractions/setup-just@v3 - uses: shivammathur/setup-php@v2 with: php-version: '8.5' diff --git a/Makefile b/Makefile deleted file mode 100644 index bb5d823e..00000000 --- a/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -## help - Display help about make targets for this Makefile -help: - @cat Makefile | grep '^## ' --color=never | cut -c4- | sed -e "`printf 's/ - /\t- /;'`" | column -s "`printf '\t'`" -t - -## clean - Cleans the project -clean: - rm -rf vendor clover.xml clover.html bin .phpunit.cache - -## codesniffer - Run linting on the PHP files -codesniffer: - composer lint - -## codesniffer-fix- Fix lint errors on PHP files -codesniffer-fix: - composer fix - -## coverage - Runs the test suite and generates a coverage report -coverage: - composer coverage - -## docs - Generate documentation for the library -docs: - curl -LJs https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.3.1/phpDocumentor.phar -o phpDocumentor.phar - php phpDocumentor.phar -d lib -t docs - -## init-examples-submodule - Initialize the examples submodule -init-examples-submodule: - git submodule init - git submodule update - -## install - Install dependencies -install: | init-examples-submodule - composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - -## lint - Lint the project -lint: codesniffer phpstan scan - -## lint-fix - Fix linting errors -lint-fix: codesniffer-fix - -## phpstan - Scan for static analysis errors -phpstan: - composer phpstan - -## release - Cuts a release for the project on GitHub (requires GitHub CLI) -# tag = The associated tag title of the release -# target = Target branch or full commit SHA -release: - gh release create ${tag} --target ${target} - -## scan - Runs security analysis on the project -scan: - composer scan - -## test - Test the project -test: - composer test - -## update - Update dependencies -update: | update-examples-submodule - composer update - -## update-examples-submodule - Update the examples submodule -update-examples-submodule: - git submodule init - git submodule update --remote - -.PHONY: help clean codesniffer codesniffer-fix coverage docs install lint lint-fix release scan test update update-examples-submodule diff --git a/README.md b/README.md index d0e56407..96c4fd10 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ You can also unsubscribe your functions in a similar manner by using the `unsubs API documentation can be found at: . -Library documentation can be found on the web at: or by building them locally via the `make docs` command. +Library documentation can be found on the web at: or by building them locally via the `just docs` command. Upgrading major versions of this project? Refer to the [Upgrade Guide](UPGRADE_GUIDE.md). @@ -102,30 +102,30 @@ For additional support, see our [org-wide support policy](https://github.com/Eas ```bash # Install dependencies -make install +just install # Update dependencies -make update +just update # Lint project -make lint -make lint-fix +just lint +just lint-fix # Run tests -EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... make test +EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... just test # Generate coverage reports (requires Xdebug for HTML report) # NOTE: When using PHP 8.2, you must use 8.2.9+ to avoid segfaults when generating coverage -EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... make coverage +EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... just coverage # Run security analysis -make scan +just scan # Generate library documentation (requires phpDocumentor.phar in the root of the project) -make docs +just docs # Update submodules -make update-examples-submodule +just update-examples-submodule ``` ### Testing diff --git a/justfile b/justfile new file mode 100644 index 00000000..dd57fd28 --- /dev/null +++ b/justfile @@ -0,0 +1,62 @@ +# Cleans the project +clean: + rm -rf vendor clover.xml clover.html bin .phpunit.cache + +# Run linting on the PHP files +codesniffer: + composer lint + +# Fix lint errors on PHP files +codesniffer-fix: + composer fix + +# Runs the test suite and generates a coverage report +coverage: + composer coverage + +# Generate documentation for the library +docs: + curl -LJs https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.3.1/phpDocumentor.phar -o phpDocumentor.phar + php phpDocumentor.phar -d lib -t docs + +# Initialize the examples submodule +init-examples-submodule: + git submodule init + git submodule update + +# Install dependencies +install: init-examples-submodule + composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + +# Lint the project +lint: codesniffer phpstan scan + +# Fix linting errors +lint-fix: codesniffer-fix + +# Scan for static analysis errors +phpstan: + composer phpstan + +# Cuts a release for the project on GitHub (requires GitHub CLI) +# tag = The associated tag title of the release +# target = Target branch or full commit SHA +release: + gh release create {{tag}} --target {{target}} + +# Runs security analysis on the project +scan: + composer scan + +# Test the project +test: + composer test + +# Update dependencies +update: update-examples-submodule + composer update + +# Update the examples submodule +update-examples-submodule: + git submodule init + git submodule update --remote From dc80b976de1ea057850f95659ef48d6694aa0894 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 30 Jan 2026 11:33:19 -0700 Subject: [PATCH 2/3] fix: CI references to just --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 212dc6b1..80aa051f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,9 +16,9 @@ jobs: with: php-version: '8.5' - name: install dependencies - run: make install + run: just install - name: lint - run: make lint + run: just lint run-tests: runs-on: ubuntu-latest strategy: @@ -41,9 +41,9 @@ jobs: key: ${{ runner.os }}-${{ matrix.phpversion }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: ${{ runner.os }}-${{ matrix.phpversion }}-composer- - name: install dependencies - run: make install + run: just install - name: test with phpunit on ${{ matrix.phpversion }} - run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make coverage + run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just coverage - name: Coveralls if: github.ref == 'refs/heads/master' env: @@ -59,9 +59,9 @@ jobs: with: php-version: '8.5' - name: Install Dependencies - run: make install + run: just install - name: Generate Docs - run: make docs + run: just docs - name: Deploy Docs uses: peaceiris/actions-gh-pages@v4 with: From f2ccb8f356f9092e761939b20386db745e1c1d89 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 30 Jan 2026 11:39:57 -0700 Subject: [PATCH 3/3] fix: justfile release target --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index dd57fd28..7514b2ec 100644 --- a/justfile +++ b/justfile @@ -41,7 +41,7 @@ phpstan: # Cuts a release for the project on GitHub (requires GitHub CLI) # tag = The associated tag title of the release # target = Target branch or full commit SHA -release: +release tag target: gh release create {{tag}} --target {{target}} # Runs security analysis on the project