Skip to content

Commit 6bd53d8

Browse files
Add reference links, add navigation
1 parent c2d2c7a commit 6bd53d8

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

content/full-day/4-testing.md

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Continuous integration and testing
22

3+
| [← Cloud-based development with GitHub Codespaces][walkthrough-previous] | [Next: Helping GitHub Copilot understand context →][walkthrough-next] |
4+
|:-----------------------------------|------------------------------------------:|
5+
36
Chances are you've heard the abbreviation CI/CD, which stands for continuous integration and continuous delivery (or sometimes continuous deployment). CI is centered on incorporating new code into the existing codebase, and typically includes running tests and performing builds. CD focuses on the next logical step, taking the now validated code and generating the necessary outputs to be pushed to the cloud or other destinations. This is probably the most focused upon component of DevOps.
47

58
CI/CD fosters a culture of rapid development, collaboration, and continuous improvement, allowing organizations to deliver software updates and new features more reliably and quickly. It ensures consistency, and allows developers to focus on writing code rather than performing manual processes.
69

7-
[GitHub Actions](https://github.com/features/actions) is an automation platform upon which you can build your CI/CD process. It can also be used to automate other tasks, such as resizing images and validating machine learning models.
10+
[GitHub Actions][github-actions] is an automation platform upon which you can build your CI/CD process. It can also be used to automate other tasks, such as resizing images and validating machine learning models.
811

912
## Scenario
1013

11-
A set of unit tests exist for the Python server for the project. You want to ensure those tests are run whenever someone makes a [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) (PR). To meet this requirement, you'll need to define a workflow for the project, and ensure there is a [trigger](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows) for pull requests to main. Fortunately, [GitHub Copilot](https://gh.io/copilot) can aid you in creating the necessary YML file!
14+
A set of unit tests exist for the Python server for the project. You want to ensure those tests are run whenever someone makes a [pull request][about-prs] (PR). To meet this requirement, you'll need to define a workflow for the project, and ensure there is a [trigger][workflow-triggers] for pull requests to main. Fortunately, [GitHub Copilot][copilot] can aid you in creating the necessary YML file!
1215

1316
## Exploring the test
1417

@@ -24,7 +27,7 @@ Let's take a look at the tests defined for the project.
2427
> [!NOTE]
2528
> Consider using the following GitHub Copilot tips to gain an understanding of the tests:
2629
>
27-
> - `/explain` is a [slash command](https://docs.github.com/en/copilot/using-github-copilot/copilot-chat/github-copilot-chat-cheat-sheet) to quickly ask for an explanation
30+
> - `/explain` is a [slash command][copilot-slash-commands][copilot-slash-commands] to quickly ask for an explanation
2831
> - Highlight specific sections of the file to focus on areas you may have questions about
2932
3033
## Understanding workflows
@@ -101,9 +104,10 @@ jobs:
101104
102105
## Push the workflow to the repository
103106
104-
With the workflow created, let's push it to the repository. Typically you would create a PR for any new code (which this is). To streamline the process, we're going to push straight to main as we'll be exploring pull requests and the [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) in a later exercise. You'll start by obtaining the number of the [issue you created earlier](./2-issues.md), creating a commit for the new code, then pushing it to main.
107+
With the workflow created, let's push it to the repository. Typically you would create a PR for any new code (which this is). To streamline the process, we're going to push straight to main as we'll be exploring pull requests and the [GitHub flow][github-flow] in a [later exercise][github-flow-exercise]. You'll start by obtaining the number of the [issue you created earlier][issues-exercise], creating a commit for the new code, then pushing it to main.
105108
106-
> **NOTE:** All commands are entered using the terminal window in the codespace.
109+
> [!NOTE]
110+
> All commands are entered using the terminal window in the codespace.
107111
108112
1. Use the open terminal window in your codespace, or open it (if necessary) by pressing <kbd>Ctl</kbd> + <kbd>`</kbd>.
109113
1. List all issues for the repository by entering the following command in the terminal window:
@@ -147,11 +151,27 @@ You've now seen a workflow, and explore the details of a run!
147151

148152
## Summary and next steps
149153

150-
Congratulations! You've implemented automated testing, a standard part of continuous integration, which is critical to successful DevOps. Automating these processes ensures consistency and reduces the workload required for developers and administrators. You have created a workflow to run tests on any new code for your codebase. Let's explore [context with GitHub Copilot chat](./5-context.md).
154+
Congratulations! You've implemented automated testing, a standard part of continuous integration, which is critical to successful DevOps. Automating these processes ensures consistency and reduces the workload required for developers and administrators. You have created a workflow to run tests on any new code for your codebase. Let's explore [context with GitHub Copilot chat][walkthrough-next].
151155

152156
### Resources
153-
154-
- [GitHub Actions](https://github.com/features/actions)
155-
- [GitHub Actions Marketplace](https://github.com/marketplace?type=actions)
156-
- [About continuous integration](https://docs.github.com/en/actions/automating-builds-and-tests/about-continuous-integration)
157-
- [GitHub Skills: Test with Actions](https://github.com/skills/test-with-actions)
157+
- [GitHub Actions][github-actions]
158+
- [GitHub Actions Marketplace][actions-marketplace]
159+
- [About continuous integration][about-ci]
160+
- [GitHub Skills: Test with Actions][skills-test-actions]
161+
162+
| [← Cloud-based development with GitHub Codespaces][walkthrough-previous] | [Next: Helping GitHub Copilot understand context →][walkthrough-next] |
163+
|:-----------------------------------|------------------------------------------:|
164+
165+
[about-ci]: https://docs.github.com/en/actions/automating-builds-and-tests/about-continuous-integration
166+
[about-prs]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
167+
[actions-marketplace]: https://github.com/marketplace?type=actions
168+
[workflow-triggers]: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
169+
[copilot]: https://gh.io/copilot
170+
[copilot-slash-commands]: https://docs.github.com/en/copilot/using-github-copilot/copilot-chat/github-copilot-chat-cheat-sheet
171+
[github-actions]: https://github.com/features/actions
172+
[github-flow]: https://docs.github.com/en/get-started/quickstart/github-flow
173+
[github-flow-exercise]: ./7-github-flow.md
174+
[issues-exercise]: ./2-issues.md
175+
[skills-test-actions]: https://github.com/skills/test-with-actions
176+
[walkthrough-previous]: 3-codespaces.md
177+
[walkthrough-next]: 5-context.md

0 commit comments

Comments
 (0)