Skip to content

Commit f6512cb

Browse files
[Documentation:Developer] Add testing guide for external devs (#670)
Added a page under testing to explain to process of running workflows as an external contributor --------- Co-authored-by: Barb Cutler <[email protected]> Co-authored-by: Barb Cutler <Barb Cutler>
1 parent 71d86b4 commit f6512cb

13 files changed

+36
-2
lines changed

_docs/developer/testing/autograding_integration_tests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Autograding Tests
3-
category: Developer
3+
category: Developer > Development Instructions > Continuous Integration Testing
44
---
55

66
_NOTE: Currently, these tests can only be run from within Vagrant._

_docs/developer/testing/cypress.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: End-to-End testing with Cypress
3+
category: Developer > Development Instructions > Continuous Integration Testing
34
---
45

56
The _End-to-End Testing_ (e2e) suite utilizes [Cypress](https://www.cypress.io/),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: External Contributors
3+
category: Developer > Development Instructions > Continuous Integration Testing
4+
---
5+
6+
To run all Submitty workflows on a forked repository, you must manually trigger the workflow. This is because GitHub Actions do not run on forked repositories by default. One of the people in the Submitty organization must manually trigger the workflow for you. To avoid this, you can trust the workflow in your forked repository. This will allow GitHub Actions to run on your forked repository without manual intervention.
7+
8+
---
9+
10+
## Steps for External Contributors
11+
12+
1. The first step is to visit [https://github.com/GITHUB_USERNAME/Submitty/actions](https://github.com/GITHUB_USERNAME/Submitty/actions) (or click the actions tab from your forked submitty repository) and click on the button labeled "I understand my workflows, go ahead and enable them".
13+
![GitHub UI to trust workflows in fork](/images/testing/fork_trust.png)
14+
15+
2. After that, on the left side of the page, click on the workflow labeled "CI" to be able to run the workflow. Then, in the "Run workflow" dropdown, select the branch you want to run the workflow on and click the green "Run workflow" button.
16+
![GitHub UI to manually trigger workflow](/images/testing/fork_dispatch.png)
17+
3. Congratulations! You have successfully triggered the workflow on your forked repository. You should now see a new started workflow in the list of workflows.
18+
![GitHub UI to view workflow run](/images/testing/fork_workflow_run.png)
19+
20+
---
21+
22+
These steps are drawn from:
23+
24+
[https://github.com/github/docs/issues/15761](https://github.com/github/docs/issues/15761)
25+
26+
[https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow)

_docs/developer/testing/github_actions.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: GitHub Actions
3+
category: Developer > Development Instructions > Continuous Integration Testing
34
---
45

56
We utilize [GitHub actions](https://docs.github.com/en/actions) to enable *continuous integration*

_docs/developer/testing/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
title: Testing
2+
title: Continuous Integration Testing
3+
category: Developer > Development Instructions
34
---
45

56
To verify expected behavior of Submitty, we use

_docs/developer/testing/install_php.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Install PHP
3+
category: Developer > Development Instructions > Continuous Integration Testing
34
---
45

56
In order to run the PHP Linter, Static Analysis, and PHPUnit tests locally

_docs/developer/testing/linting_static_analysis.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Linting / Static Analysis
3+
category: Developer > Development Instructions > Continuous Integration Testing
34
---
45

56
To ensure the [Coding Standards](/developer/coding_style_guide) of Submitty, we use a mixture

_docs/developer/testing/php_unit_tests.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: PHP Unit Tests
3+
category: Developer > Development Instructions > Continuous Integration Testing
34
---
45

56
To validate the unit behavior of the site code, we utilize

_docs/developer/testing/python_unit_tests.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Python Unit Tests
3+
category: Developer > Development Instructions > Continuous Integration Testing
34
---
45

56
The following Python modules of Submitty are unit tested:

images/testing/fork_dispatch.png

564 KB
Loading

images/testing/fork_trust.png

393 KB
Loading

images/testing/fork_workflow_run.png

493 KB
Loading

navtreedata.js

+1
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ var NAVTREE =
214214
[ "Localization / Language Support", "/developer/development_instructions/localization", null ],
215215
[ "Continuous Integration Testing", "/developer/testing/index", [
216216
[ "Overview", "/developer/testing/index", null ],
217+
["External Contributors", "/developer/testing/external_contributors", null],
217218
[ "Installing PHP", "/developer/testing/install_php", null ],
218219
[ "Linting / Static Analysis", "/developer/testing/linting_static_analysis", null ],
219220
[ "Python Unit Tests", "/developer/testing/python_unit_tests", null ],

0 commit comments

Comments
 (0)