@@ -61,3 +61,56 @@ Coverage
6161
6262.. TODO :: this section
6363.. TODO :: coverage measurements in pull requests
64+
65+ On POSIX systems with Firefox _ installed an HTML coverage report can be generated by running:
66+
67+ .. prompt :: bash
68+
69+ tox -n cov
70+
71+ Ensure your changes do not cause a significant decrease in the test coverage.
72+ If the coverage drops below the level set in ``repo_helper.yml `` (or 80% not specified) the tests will fail.
73+
74+ .. _Firefox : https://www.mozilla.org/en-GB/firefox/
75+
76+ GitHub Actions
77+ -----------------
78+
79+ Tests are run on pushes to GitHub using `GitHub Actions `_.
80+ You can see the results of these test at the bottom of the pull request page:
81+
82+ .. figure :: github-actions-checks.png
83+
84+ A label will be added to the pull request automatically if the tests fail:
85+
86+ .. figure :: pull-request-labels
87+
88+ This makes it easy to identify which tests are failing.
89+ Once the tests pass the label will be removed automatically.
90+
91+ If you are a first time contributor to a project manual approval is required for GitHub Actions to run.
92+ For more information see https://github.blog/2021-04-22-github-actions-update-helping-maintainers-combat-bad-actors/
93+
94+ `Branch protection `_ is used to ensure the following tests pass before merging pull requests:
95+
96+ * Tests on Windows and Linux for all CPython version between 3.6 and 3.9 supported by the project.
97+ * Tests on Windows and Linux for PyPy 3.6, if supported by the project.
98+ * mypy type checking on Windows and Linux.
99+ * Flake8
100+ * The documentation check, if the project has documentation.
101+
102+ If the project only supports Linux the tests on Window will not run and are not required to merge the pull request.
103+
104+ Tests on macOS are optional as they take longer than other platforms.
105+ CPython 3.10 and PyPy 3.7 are considered experimental and will not block a pull request from being merged if they fail.
106+ However, you should still check the results of these runs to ensure your changes have not introduced any errors there.
107+
108+ You should check the :guilabel: `Files changed ` tab of the pull request to see whether any issues have been identified.
109+ This can be due to syntax errors in the documentation source or issues identified by flake8 and Codefactor _.
110+
111+ Your pull request may be commented on by Coveralls _ to report any changes to the code coverage.
112+
113+ .. _GitHub Actions : https://github.com/features/actions
114+ .. _Branch protection : https://docs.github.com/en/github/administering-a-repository/about-protected-branches
115+ .. _Codefactor : https://www.codefactor.io/
116+ .. _Coveralls : https://coveralls.io/
0 commit comments