Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Update testing.md
  • Loading branch information
lohanidamodar authored Apr 9, 2024
commit 333dfd99ec77e7b94b1e856581664913f746c0fe
20 changes: 20 additions & 0 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

We use GitHub actions for testing and maintaining code quality. There are two sets of templates that you can use for running the tests and analyzers.

## Composer setup

Install dev dependencies. Phpunit for testing, laravel pint for formatting and lining, phpstan for static analysis.

```bash
composer require phpunit/phpunit laravel/pint phpstan/phpstan --dev
```

Also update scripts so it's easier to use

```json
"scripts": {
"lint": "./vendor/bin/pint --test",
"format": "./vendor/bin/pint",
"test": "vendor/bin/phpunit --configuration phpunit.xml",
"check": "./vendor/bin/phpstan analyse --level max src tests"
},
```


## Without using docker

If the library doesn't require docker to function and run tests, use these set of templates to create GitHub action for those libraries.
Expand Down