Browse Source

Add a page on testing pull requests

(cherry picked from commit 0d54651250b1c22f7d8e10ac3296f9ff42bb044f)
Hugo Locurcio 4 years ago
parent
commit
13c42efab6

BIN
community/contributing/img/testing_pull_requests_access_checks.png


BIN
community/contributing/img/testing_pull_requests_access_fork.png


BIN
community/contributing/img/testing_pull_requests_checks_artifacts.png


BIN
community/contributing/img/testing_pull_requests_checks_platforms.png


BIN
community/contributing/img/testing_pull_requests_fork_zip.png


BIN
community/contributing/img/testing_pull_requests_nightly_link.png


+ 1 - 0
community/contributing/index.rst

@@ -8,6 +8,7 @@ Contributing
    ways_to_contribute
    best_practices_for_engine_contributors
    pr_workflow
+   testing_pull_requests
    bisecting_regressions
    code_style_guidelines
    bug_triage_guidelines

+ 104 - 0
community/contributing/testing_pull_requests.rst

@@ -0,0 +1,104 @@
+.. _doc_testing_pull_requests:
+
+Testing pull requests
+=====================
+
+Many people are developing new features or fixing bugs on GitHub.
+To help with engine development, you may be asked to test those pull requests
+with a Godot build that includes code from the pull request in question.
+
+Thanks to GitHub Actions, all `pull requests <https://github.com/godotengine/godot/pulls>`__
+have continuous builds available. These builds let you try out pull requests
+without having to compile anything from source.
+
+Downloading a compiled build
+----------------------------
+
+You can download pull request builds from GitHub Actions. Since only signed in
+users may download builds directly from GitHub Actions, the procedure varies
+depending on whether you have a GitHub account or not.
+
+.. note::
+
+    Due to a GitHub Actions limitation, builds are only available for 90 days
+    after the pull request was last updated. If you still wish to try a
+    pull request locally, you can
+    :ref:`compile the pull request branch from source <doc_testing_pull_requests_compile>`
+    instead.
+
+If you have a GitHub account
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Open the pull request page. Click the **Checks** tab near the top of the page:
+
+.. image:: img/testing_pull_requests_access_checks.png
+
+- In the list of platforms that appears on the left, select your platform by clicking
+  it then choose the type of build you need (editor or export template).
+  If in doubt, select an editor build:
+
+.. image:: img/testing_pull_requests_checks_platforms.png
+
+- Click the **Artifacts** dropdown on the right of the page then click the artifact's
+  name to download it:
+
+.. image:: img/testing_pull_requests_checks_artifacts.png
+
+- Extract the ZIP archive then run the executable.
+  Note that Windows and macOS binaries are not code signed.
+  This means you may have to bypass a security warning before you can run the executable.
+  If you frequently test pull request builds, it may be better to disable
+  Windows SmartScreen or `disable macOS Gatekeeper <https://disable-gatekeeper.github.io/>`__ permanently.
+
+If you don't have a GitHub account
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If you don't have a GitHub account and can't sign up for one,
+you can use the third-party `nightly.link <https://nightly.link>`__ service
+to generate a universal download link.
+
+- Open the pull request page. Click the *fork*'s branch name near the top of the page:
+
+.. image:: img/testing_pull_requests_access_fork.png
+
+- Now that you are on the fork's branch page, click the ``.github`` folder at the top of the file list.
+  Then, click on the ``workflows`` folder (whicb is inside the ``.github`` folder).
+  Click the workflow file for the platform you wish to download artifacts for.
+  *After* clicking on the file (which opens the file view), copy the page URL from your browser's address bar.
+
+- Open the `nightly.link <https://nightly.link>`__ website and paste the URL you just copied
+  into the text field located below the heading **Paste a GitHub link, get a nightly.link!**.
+  After pasting the URL, click **Get links** on the right.
+  If the the format of the URL you pasted is correct, you should be presented
+  with a page like this:
+
+.. image:: img/testing_pull_requests_nightly_link.png
+
+- Click the URL of the artifact you wish to download.
+
+- Extract the ZIP archive then run the executable.
+  Note that Windows and macOS binaries are not code signed.
+  This means you may have to bypass a security warning before you can run the executable.
+  If you frequently test pull request builds, it may be better to disable
+  Windows SmartScreen or `disable macOS Gatekeeper <https://disable-gatekeeper.github.io/>`__ permanently.
+
+.. _doc_testing_pull_requests_compile:
+
+Compiling a pull request branch from source
+-------------------------------------------
+
+This approach may be needed for pull requests that were last updated more than
+90 days ago, or to test on platforms and configurations that are not supported
+by Godot's GitHub Actions setup.
+
+- Open the pull request page. Click the *fork*'s branch name near the top of the page:
+
+.. image:: img/testing_pull_requests_access_fork.png
+
+- Now that you are on the fork's branch page, click the green **Code** button on the right of the page
+  then choose **Download ZIP** in the dropdown:
+
+.. image:: img/testing_pull_requests_fork_zip.png
+
+- Extract the ZIP archive and follow the :ref:`compiling <toc-devel-compiling>` instructions
+  for your operating system.