zingimmick / laravel-scout-opensearch

Laravel Scout custom engine for OpenSearch
MIT License
19 stars 6 forks source link

How to run tests #80

Closed gazzoy closed 10 months ago

gazzoy commented 10 months ago

First of all, thank you for the wonderful package.

This is a question rather than a feature request. I forked this package to add some new features for my project, then did'nt get how to run tests.

Could you please tell me how to run tests for this package?

zingimmick commented 10 months ago

Where do you want to run tests, local or GitHub actions?

gazzoy commented 10 months ago

Thanks for you reply. On local. Actually I've just found the way to run GitHub Actions on my local. Is this the right way supposed to be?

zingimmick commented 10 months ago

On local.

  1. Fork the zingimmick/laravel-scout-opensearch repository and clone it
git clone git@github.com:<your-name>/laravel-scout-opensearch.git
cd laravel-scout-opensearch
  1. Install dependencies and verify your local environment
composer update
composer check-platform-reqs
  1. Add new features and test cases

  2. Start the OpenSearch service via docker

docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e "plugins.security.disabled=true" opensearchproject/opensearch:latest
  1. Run tests using phpunit
./vendor/bin/phpunit

run GitHub Actions on my local. Is this the right way supposed to be?

I haven't used GitHub's self-hosted runners before, so it's hard to say it's the right way or not.

gazzoy commented 10 months ago

Thank you it works perfectly!

Maybe that would be great if you put those test steps on README.md.

zingimmick commented 10 months ago

I see, I will put those test steps on README.md as soon as possible.