[docs] add testing documentation
Author: stas00
Pull request: yes

This PR adds the initial version of the testing doc.

* This is partially based on the work I did for [fastai last year](https://fastai1.fast.ai/dev/test.html), but rewritten to match the `transformers` environment. It's full of useful tips and tools for running tests. it's very useful for those who do a lot of testing.
* then adding most of the helpers in `testing_utils.py`
* adding CI information

More work is surely needed, but this is a start.

Thanks to @sshleifer for the detailed info on CIs.

@sgugger 


Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7101?src=pr&el=h1) Report
> Merging [#7101](https://codecov.io/gh/huggingface/transformers/pull/7101?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/90cde2e938638e64a8696a12b79ee5f52364b162?el=desc) will **increase** coverage by `0.31%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/7101/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/7101?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #7101      +/-   ##
==========================================
+ Coverage   79.62%   79.94%   +0.31%     
==========================================
  Files         168      168              
  Lines       32284    32284              
==========================================
+ Hits        25706    25809     +103     
+ Misses       6578     6475     -103     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/7101?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_tf\_longformer.py](https://codecov.io/gh/huggingface/transformers/pull/7101/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9sb25nZm9ybWVyLnB5) | `16.37% <0.00%> (-82.31%)` | :arrow_down: |
| [src/transformers/modeling\_longformer.py](https://codecov.io/gh/huggingface/transformers/pull/7101/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19sb25nZm9ybWVyLnB5) | `19.71% <0.00%> (-72.34%)` | :arrow_down: |
| [src/transformers/tokenization\_bert\_generation.py](https://codecov.io/gh/huggingface/transformers/pull/7101/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYmVydF9nZW5lcmF0aW9uLnB5) | `39.28% <0.00%> (-55.36%)` | :arrow_down: |
| [src/transformers/tokenization\_mbart.py](https://codecov.io/gh/huggingface/transformers/pull/7101/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWJhcnQucHk=) | `57.14% <0.00%> (-39.69%)` | :arrow_down: |
| [src/transformers/tokenization\_funnel.py](https://codecov.io/gh/huggingface/transformers/pull/7101/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fZnVubmVsLnB5) | `62.79% <0.00%> (-34.89%)` | :arrow_down: |
| [src/transformers/configuration\_longformer.py](https://codecov.io/gh/huggingface/transformers/pull/7101/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2xvbmdmb3JtZXIucHk=) | `75.00% <0.00%> (-25.00%)` | :arrow_down: |
| [src/transformers/modeling\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/7101/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `75.91% <0.00%> (-21.17%)` | :arrow_down: |
| [src/transformers/modeling\_mobilebert.py](https://codecov.io/gh/huggingface/transformers/pull/7101/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19tb2JpbGViZXJ0LnB5) | `79.21% <0.00%> (-10.25%)` | :arrow_down: |
| [src/transformers/generation\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/7101/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `86.46% <0.00%> (-0.26%)` | :arrow_down: |
| [src/transformers/pipelines.py](https://codecov.io/gh/huggingface/transformers/pull/7101/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9waXBlbGluZXMucHk=) | `80.75% <0.00%> (-0.25%)` | :arrow_down: |
| ... and [8 more](https://codecov.io/gh/huggingface/transformers/pull/7101/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/7101?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7101?src=pr&el=footer). Last update [90cde2e...52a9e54](https://codecov.io/gh/huggingface/transformers/pull/7101?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


I'm curious - why is it OK to have XXX in the code, but not in the docs? especially developer-oriented (i.e. end users most likely won't read this). Is it XXX that's the problem and not the fact that there is a note suggesting more to come in the future/this section is incomplete? Would TODO be acceptable?

@sgugger, thank you for much for this very detailed feedback. I think I got it all. I will make another path on back quotes to catch any that you and I have missed that are in markdown style.

github sucked big way on this PR with multiple code suggestions - every time I approved the suggested change, it'd reload the page, hide all the other suggestion and scroll away - I had to unhide suggestions, scroll to find the next item, and so on - about 20 times! :( May I suggest that in such a situation of dozens of proposed doc changes, it'd be faster for both of us, if you were to just commit the changes directly. (please correct me if I'm wrong and this is not faster for you) I will learn from the diffs, the changes are mostly self-explanatory.


> Note that you can check a preview of the docs built on top of this PR [here](https://84533-155220641-gh.circle-artifacts.com/0/docs/_build/html/testing.html).

I just run `make docs` and checked the result - but obviously i didn't see many things you did see.

Let me know if anything else needs to be changed. The doc will have extra additions later I just had to stop somewhere for the first pass.


Thanks for updating, this looks great so merging!