Skip to content

Commit 3448910

Browse files
author
github-actions
committed
Update to 2 in STEP and README.md
1 parent f771c81 commit 3448910

File tree

2 files changed

+24
-34
lines changed

2 files changed

+24
-34
lines changed

.github/steps/-step.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1
1+
2

README.md

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,49 +14,39 @@ _Create workflows that enable you to use Continuous Integration (CI) for your pr
1414
</header>
1515

1616
<!--
17-
<<< Author notes: Step 1 >>>
18-
Choose 3-5 steps for your course.
19-
The first step is always the hardest, so pick something easy!
20-
Link to docs.github.com for further explanations.
21-
Encourage users to open new tabs for steps!
17+
<<< Author notes: Step 2 >>>
18+
Start this step by acknowledging the previous step.
19+
Define terms and link to docs.github.com.
2220
-->
2321

24-
## Step 1: Add a test workflow
22+
## Step 2: Fix the test
2523

26-
_Welcome to "GitHub Actions: Continuous Integration"! :wave:_
24+
_Great job adding the templated workflow! :tada:_
2725

28-
**What is _continuous integration_?**: [Continuous integration](https://en.wikipedia.org/wiki/Continuous_integration) can help you stick to your team’s quality standards by running tests and reporting the results on GitHub. CI tools run builds and tests, triggered by commits. The quality results post back to GitHub in the pull request. The goal is fewer issues in `main` and faster feedback as you work.
26+
Adding that file to this branch is enough for GitHub Actions to begin running CI on your repository.
2927

30-
![An illustration with a left half and a right half. On the left: illustration of how GitHub Actions terms are encapsulated. At the highest level: workflows and event triggers. Inside workflows: jobs and definition of the build environment. Inside jobs: steps. Inside steps: a call to an action. On the right: the evaluated sequence: workflow, job, step, action.](https://user-images.githubusercontent.com/6351798/88589835-f5ce0900-d016-11ea-8c8a-0e7d7907c713.png)
28+
When a GitHub Actions workflow is running, you should see some checks in progress, like the screenshot below.
3129

32-
- **Workflow**: A workflow is a unit of automation from its start to finish, including the definition of what triggers the automation, what environment or other aspects should be taken into account during the automation, and what should happen as a result of the trigger.
33-
- **Job**: A job is a section of the workflow, and is made up of one or more steps. In this section of our workflow, the template defines the steps that make up the `build` job.
34-
- **Step**: A step represents one _effect_ of the automation. A step could be defined as a GitHub Action, or another unit, like printing something to the console.
35-
- **Action**: An action is a piece of automation written in a way that is compatible with workflows. Actions can be written by GitHub, by the open source community, or you can write them yourself!
30+
<img alt="checks in progress in a merge box" src=https://user-images.githubusercontent.com/16547949/66080348-ecc5f580-e533-11e9-909e-c213b08790eb.png width=400 />
3631

37-
To learn more, check out [Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions) in the GitHub Docs.
32+
You can follow along as GitHub Actions runs your job by going to the **Actions** tab or by clicking "Details" in the merge box below.
3833

39-
First, let's add a workflow to lint (clean, like a lint roller) our Markdown files in this repository.
34+
When the tests finish, you'll see a red X :x: or a green check mark :heavy_check_mark: in the merge box. At that point, you can access the logs for the build job and its associated steps.
4035

41-
### :keyboard: Activity: Add a test workflow
36+
_By looking at the logs, can you identify which tests failed?_ To find it, go to one of the failed builds and scroll through the log. Look for a section that lists all the unit tests. We're looking for the name of the test with an "x".
4237

43-
1. Open a new browser tab, and work through the following steps in that tab while you read the instructions in this tab.
44-
1. Go to the **Actions tab**.
45-
1. Click **New workflow**.
46-
1. Search for "Simple workflow" and click **Configure**.
47-
1. Name your workflow `ci.yml`.
48-
1. Update the workflow by deleting the last two steps.
49-
1. Add the following step at the end of your workflow:
50-
```yml
51-
- name: Run markdown lint
52-
run: |
53-
npm install remark-cli remark-preset-lint-consistent
54-
npx remark . --use remark-preset-lint-consistent --frail
55-
```
56-
> Even after the code is indented properly in `ci.yml`, you will see a build error in GitHub Actions. We'll fix this in the next step.
57-
1. Click **Commit changes...**, and choose to make a new branch named `ci`.
58-
1. Click **Propose changes**.
59-
1. Click **Create pull request**.
38+
<img alt="screenshot of a sample build log with the names of the tests blurred out" src=https://user-images.githubusercontent.com/16547949/65922013-e740a200-e3b1-11e9-8151-faf52c30201e.png width=400 />
39+
40+
If the checks don't appear or if the checks are stuck in progress, there's a few things you can do to try and trigger them:
41+
42+
- Refresh the page, it's possible the workflow ran and the page just hasn't been updated with that change.
43+
- Try making a commit on this branch. Our workflow is triggered with a `push` event, and committing to this branch will result in a new `push`.
44+
- Edit the workflow file on GitHub and ensure there are no red lines indicating a syntax problem.
45+
46+
### :keyboard: Activity: Fix the test
47+
48+
1. Update the contents in the `ci` branch to get the test to pass. You need to look at the logs to see what caused the test to fail.
49+
1. **Commit changes**.
6050
1. Wait about 20 seconds and then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/actions) will automatically update to the next step.
6151

6252
<footer>

0 commit comments

Comments
 (0)