Files
FreshRSS/docs/en/developers/03_Running_tests.md
Alexandre Alapetite 1acd3ab09b Use typographic quotes (#4133)
* Use typographic quotes

* A few fixes

* Fix

* Fix not saved

* Implement feedback

* Detail

* Revert spoken English fixes
Left for a future dedicated discussion

* More reverts

* Final reverts

* Final minor
2022-01-08 21:58:55 +01:00

1.5 KiB
Raw Blame History

Running tests

FreshRSS is tested with PHPUnit. No code should be merged in edge if the tests dont pass.

Locally

As a developer, you can run the test suite on your PC easily with make commands. You can run the test suite with:

make test

This command downloads the PHPUnit binary and verifies its checksum. If the verification fails, the file is deleted. In this case, you should open an issue on GitHub to let maintainers know about the problem.

Then, it executes PHPUnit in a Docker container. If you dont use Docker, you can run the command directly with:

NO_DOCKER=true make test

The linter can be run with a make command as well:

make lint # to execute the linter on the PHP files
make lint-fix # or, to fix the errors detected by the linter

Similarly to PHPUnit, it downloads a PHP_CodeSniffer binary (i.e. phpcs or phpcbf depending on the command) and verifies its checksum.

GitHub Actions for Continuous Integration

Tests are automatically run when you open a pull request on GitHub. They are performed with GitHub Actions. This ensures your code will not introduce some kind of regression. We will not merge a PR if tests fail so we will ask you to fix any bugs before reviewing your code.

If you are interested, you can take a look at the configuration file.