Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/serpapi-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- name: Run linter
run: composer run-script lint

- name: Run static analysis
run: composer run-script analyse

run:
runs-on: ubuntu-latest
strategy:
Expand Down
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.PHONY: all clean install lint analyse test readme demo

# Default target
all: install readme lint test
all: install readme lint analyse test

# Clean up the project
clean:
Expand All @@ -13,10 +15,21 @@ install:
lint:
vendor/bin/phpcs

# Run static analysis
analyse:
vendor/bin/phpstan analyse --no-progress --memory-limit=512M

# Run the tests
test:
vendor/bin/phpunit -c phpunit.xml

# Generate README from ERB template
readme:
erb -T '-' README.md.erb > README.md

# Run the demo scripts against the live API (requires SERPAPI_KEY)
demo:
@for file in demo/*.php; do \
echo "running $$file"; \
php $$file || exit 1; \
done
Loading
Loading