Skip to content

[Documentation:Developer] Add testing guide for external devs #670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _docs/developer/testing/autograding_integration_tests.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Autograding Tests
category: Developer
category: Developer > Development Instructions > Continuous Integration Testing
---

_NOTE: Currently, these tests can only be run from within Vagrant._
Expand Down
1 change: 1 addition & 0 deletions _docs/developer/testing/cypress.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: End-to-End testing with Cypress
category: Developer > Development Instructions > Continuous Integration Testing
---

The _End-to-End Testing_ (e2e) suite utilizes [Cypress](https://www.cypress.io/),
Expand Down
26 changes: 26 additions & 0 deletions _docs/developer/testing/external_contributors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: External Contributors
category: Developer > Development Instructions > Continuous Integration Testing
---

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.

---

## Steps for External Contributors

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".
![GitHub UI to trust workflows in fork](/images/testing/fork_trust.png)

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.
![GitHub UI to manually trigger workflow](/images/testing/fork_dispatch.png)
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.
![GitHub UI to view workflow run](/images/testing/fork_workflow_run.png)

---

These steps are drawn from:

[https://github.com/github/docs/issues/15761](https://github.com/github/docs/issues/15761)

[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)
1 change: 1 addition & 0 deletions _docs/developer/testing/github_actions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: GitHub Actions
category: Developer > Development Instructions > Continuous Integration Testing
---

We utilize [GitHub actions](https://docs.github.com/en/actions) to enable *continuous integration*
Expand Down
3 changes: 2 additions & 1 deletion _docs/developer/testing/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Testing
title: Continuous Integration Testing
category: Developer > Development Instructions
---

To verify expected behavior of Submitty, we use
Expand Down
1 change: 1 addition & 0 deletions _docs/developer/testing/install_php.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Install PHP
category: Developer > Development Instructions > Continuous Integration Testing
---

In order to run the PHP Linter, Static Analysis, and PHPUnit tests locally
Expand Down
1 change: 1 addition & 0 deletions _docs/developer/testing/linting_static_analysis.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Linting / Static Analysis
category: Developer > Development Instructions > Continuous Integration Testing
---

To ensure the [Coding Standards](/developer/coding_style_guide) of Submitty, we use a mixture
Expand Down
1 change: 1 addition & 0 deletions _docs/developer/testing/php_unit_tests.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: PHP Unit Tests
category: Developer > Development Instructions > Continuous Integration Testing
---

To validate the unit behavior of the site code, we utilize
Expand Down
1 change: 1 addition & 0 deletions _docs/developer/testing/python_unit_tests.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Python Unit Tests
category: Developer > Development Instructions > Continuous Integration Testing
---

The following Python modules of Submitty are unit tested:
Expand Down
Binary file added images/testing/fork_dispatch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/testing/fork_trust.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/testing/fork_workflow_run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions navtreedata.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ var NAVTREE =
[ "Localization / Language Support", "/developer/development_instructions/localization", null ],
[ "Continuous Integration Testing", "/developer/testing/index", [
[ "Overview", "/developer/testing/index", null ],
["External Contributors", "/developer/testing/external_contributors", null],
[ "Installing PHP", "/developer/testing/install_php", null ],
[ "Linting / Static Analysis", "/developer/testing/linting_static_analysis", null ],
[ "Python Unit Tests", "/developer/testing/python_unit_tests", null ],
Expand Down
Loading