]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - .github/CONTRIBUTING.md
Translated using Weblate (Arabic)
[github/Chocobozzz/PeerTube.git] / .github / CONTRIBUTING.md
index 704b22b8b52b86048253b030bd6c0e4118a48fc3..2af5c236ae753e60827937d5eb3ac918d67e5802 100644 (file)
@@ -63,8 +63,12 @@ It is not hosted on GitHub but on [Framasoft](https://framasoft.org/)'s own [Git
 
 ## Develop
 
-Don't hesitate to talk about features you want to develop by creating/commenting an issue
-before you start working on them :).
+Always talk about features you want to develop by creating/finding and commenting the issue tackling your problem
+before you start working on it, and inform the community that you begin coding by claiming the issue.
+
+Once you are ready to show your code to ask for feedback, submit a *draft* Pull Request.
+Once you are ready for a code review before merge, submit a Pull Request. In any case, please
+link your PR to the issues it solves by using the GitHub syntax: "fixes #issue_number".
 
 ### Prerequisites
 
@@ -160,60 +164,67 @@ and the web server is automatically restarted.
 $ npm run dev
 ```
 
-### Testing the federation of PeerTube servers
+### Testing
+
+Your code contributions must pass the tests before they can be merged. Tests ensure most of the application behaves
+as expected and respect the syntax conventions. They will run upon PR submission as part of our CI, but running them beforehand yourself will get you faster feedback and save CI runner time for others.
+
+PeerTube mainly features backend and plugin tests, found in `server/tests`.
+
+#### Unit tests
 
 Create a PostgreSQL user **with the same name as your username** in order to avoid using the *postgres* user.
+
 Then, we can create the databases (if they don't already exist):
 
 ```
-$ sudo -u postgres createuser you_username --createdb
-$ createdb -O peertube peertube_test{1,2,3}
+$ sudo -u postgres createuser you_username --createdb --superuser
+$ npm run clean:server:test
 ```
 
-Build the application and flush the old tests data:
+Build the application and run the unit/integration tests:
 
 ```
 $ npm run build -- --light
-$ npm run clean:server:test
+$ npm test
 ```
 
-This will run 3 nodes:
+If you just want to run 1 test (which is what you want to debug a specific test rapidly):
 
 ```
-$ npm run play
+$ npm run mocha -- --exit -r ts-node/register -r tsconfig-paths/register --bail server/tests/api/index.ts
 ```
 
-Then you will get access to the three nodes at `http://localhost:900{1,2,3}`
-with the `root` as username and `test{1,2,3}` for the password.
-
-Instance configurations are in `config/test-{1,2,3}.yaml`.
+Instance configurations are in `config/test-{1,2,3,4,5,6}.yaml`.
+Note that only instance 2 has transcoding enabled.
 
-### Unit tests
+#### Testing the federation of PeerTube servers
 
 Create a PostgreSQL user **with the same name as your username** in order to avoid using the *postgres* user.
-
 Then, we can create the databases (if they don't already exist):
 
 ```
-$ sudo -u postgres createuser you_username --createdb --superuser
-$ npm run clean:server:test
+$ sudo -u postgres createuser you_username --createdb
+$ createdb -O peertube peertube_test{1,2,3}
 ```
 
-Build the application and run the unit/integration tests:
+Build the application and flush the old tests data:
 
 ```
 $ npm run build -- --light
-$ npm test
+$ npm run clean:server:test
 ```
 
-If you just want to run 1 test:
+This will run 3 nodes:
 
 ```
-$ npm run mocha -- --exit -r ts-node/register -r tsconfig-paths/register --bail server/tests/api/index.ts
+$ npm run play
 ```
 
-Instance configurations are in `config/test-{1,2,3,4,5,6}.yaml`.
-Note that only instance 2 has transcoding enabled.
+Then you will get access to the three nodes at `http://localhost:900{1,2,3}`
+with the `root` as username and `test{1,2,3}` for the password.
+
+Instance configurations are in `config/test-{1,2,3}.yaml`.
 
 ### Emails