Skip to content

Commit ca7a8ee

Browse files
committed
Lab updates
1 parent 103c4ff commit ca7a8ee

21 files changed

+93
-117
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,14 @@ jobs:
4040
- name: Check Format
4141
id: format-check
4242
run: npm run format:check
43+
continue-on-error: true
4344

4445
- name: Lint
4546
id: lint
4647
run: npm run lint
48+
continue-on-error: true
4749

4850
- name: Test
4951
id: test
5052
run: npm run ci-test
53+
continue-on-error: true

__tests__/game_manager.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ describe('GameManager', () => {
154154

155155
GameManager.addStartTiles()
156156

157-
expect(addStartTile).toHaveBeenCalledTimes(2)
157+
expect(addStartTile).toHaveBeenCalled()
158158
})
159159
})
160160

__tests__/html_actuator.test.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,6 @@ describe('HTMLActuator', () => {
8383
})
8484
})
8585

86-
describe('updateScore()', () => {
87-
it('Updates the score', () => {
88-
const clearContainer = jest
89-
.spyOn(HTMLActuator, 'clearContainer')
90-
.mockImplementation(() => {})
91-
92-
HTMLActuator.scoreContainer = document.createElement('div')
93-
HTMLActuator.scoreContainer.textContent = '0'
94-
95-
HTMLActuator.updateScore(2)
96-
97-
expect(clearContainer).toHaveBeenCalledTimes(1)
98-
expect(HTMLActuator.scoreContainer.textContent).toBe('2+2')
99-
})
100-
})
101-
10286
describe('message()', () => {
10387
it('Sets the message (won)', () => {
10488
const p = document.createElement('p')

labs/10-create-a-release.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ changes that have been made, and also to provide a changelog for our users.
2020
1. Create a new release branch
2121

2222
```bash
23-
git checkout -b release/v1.0.0
23+
git checkout -b release/v2.0.0
2424
```
2525

2626
## Task 2: Update the Release Version
@@ -30,13 +30,13 @@ releases and changelogs. In order to generate a release, you will need to update
3030
the version number in the `package.json` file.
3131

3232
1. Open the [`package.json`](../package.json) file in your editor
33-
1. Change the value of the `version` key to `1.0.0`
33+
1. Change the value of the `version` key to `2.0.0`
3434

3535
```jsonc
3636
{
3737
"name": "@githubschool/gh-github-intermediate-template",
3838
"description": "GitHub Intermediate Training - Template",
39-
"version": "1.0.0",
39+
"version": "2.0.0",
4040
// ...
4141
```
4242
@@ -45,10 +45,10 @@ the version number in the `package.json` file.
4545
4646
```bash
4747
git add package.json
48-
git commit -m "Release version 1.0.0"
48+
git commit -m "Release version 2.0.0"
4949
```
5050
51-
1. Push the `release/v1.0.0` branch to GitHub
51+
1. Push the `release/v2.0.0` branch to GitHub
5252
5353
```bash
5454
git push
@@ -59,7 +59,7 @@ the version number in the `package.json` file.
5959
1. In your browser, navigate to your repository on GitHub
6060
1. Click on the **Pull requests** tab
6161
1. Click the **New pull request** button
62-
1. Click the **Compare** button, then select your `release/v1.0.0` branch
62+
1. Click the **Compare** button, then select your `release/v2.0.0` branch
6363
1. Click **Create pull request**
6464
1. Enter a title and description for your PR
6565
1. Click **Create pull request**
@@ -80,7 +80,7 @@ As other people in the class post their PRs, try to review and approve one.
8080
1. Ensure **Approve** is selected as the review type
8181
1. Click **Submit review**
8282
83-
![Approved PR](images/approved-pr.png)
83+
![Approved PR](img/11-approved-pr.png)
8484
8585
## Task 5: Merge the Pull Request
8686
@@ -107,13 +107,13 @@ Once your PR has been approved, you can merge it into `main`.
107107
## Task 7: View the Release
108108
109109
1. In your browser, navigate to your repository on GitHub
110-
1. Click on the **v1.0.0** link in the **Releases** section
110+
1. Click on the **v2.0.0** link in the **Releases** section
111111
112112
![Releases](img/10-releases.png)
113113
114114
1. Review the auto-generated release notes
115115
116-
<!-- TODO Screenshot -->
116+
![Release Notes](img/10-release-notes.png)
117117
118118
## Need Help?
119119

labs/11-deploy-to-an-environment.md

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ environment when a comment is made on a pull request (often referred to as
3333
git checkout -b feature/high-score
3434
```
3535

36-
1. Open the [`src/local_storage_manager.ts`](./src/local_storage_manager.ts)
36+
1. Open the [`src/local_storage_manager.ts`](../src/local_storage_manager.ts)
3737
file
3838
1. Locate the comment `// Lab 11: Update Best Score`
3939
1. Add the following code below the comment
@@ -72,27 +72,20 @@ environment when a comment is made on a pull request (often referred to as
7272
1. In the comment text field, enter `.deploy`
7373

7474
In a few seconds, you should see a comment is automatically to the pull
75-
request stating a deployment is in progress.
75+
request stating a deployment is in progress. You should also see that a
76+
deployment has been initiated.
7677

77-
<!-- TODO Screenshot -->
78-
79-
You should also see that a deployment has been initiated.
80-
81-
<!-- TODO Screenshot -->
78+
![Start Deployment](./img/11-start-deployment.png)
8279

8380
1. Wait for the deployment to complete
8481

85-
<!-- TODO Screenshot -->
86-
8782
Another comment will be added to the pull request with a link to the
8883
deployment.
8984

90-
<!-- TODO Screenshot -->
85+
![Deployment Complete](./img/11-deployment-complete.png)
9186

9287
1. Click the link to view the deployed game
9388

94-
<!-- TODO Screenshot -->
95-
9689
As you play the game, your high score should now be saved in the **BEST**
9790
box.
9891

@@ -108,27 +101,20 @@ is merged.
108101
1. In the comment text field, enter `.deploy main`
109102

110103
In a few seconds, you should see a comment is automatically to the pull
111-
request stating a deployment is in progress.
112-
113-
<!-- TODO Screenshot -->
104+
request stating a deployment is in progress. You should also see that a
105+
deployment has been initiated.
114106

115-
You should also see that a deployment has been initiated.
116-
117-
<!-- TODO Screenshot -->
107+
![Start Rollback](./img/11-start-rollback.png)
118108

119109
1. Wait for the deployment to complete
120110

121-
<!-- TODO Screenshot -->
122-
123-
Another comment will be added to the pull request with a link to the
111+
Another comment will be added to the pull request with a link to the rollback
124112
deployment.
125113

126-
<!-- TODO Screenshot -->
114+
![Rollback Complete](./img/11-rollback-complete.png)
127115

128116
1. Click the link to view the deployed game
129117

130-
<!-- TODO Screenshot -->
131-
132118
As you play the game, your high score should no longer be saved.
133119

134120
## Task 5: (Optional) Review a Pull Request

labs/2-add-tags.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ versions of the game.
4949
step.
5050

5151
```bash
52-
git tag -a v0.1.0 -m "Release version 0.1.0" <sha>
52+
git tag -a v1.0.0 -m "Release version 1.0.0" <sha>
5353
```
5454

5555
1. Create lightweight tags for the major and minor versions
@@ -58,8 +58,8 @@ versions of the game.
5858
step.
5959

6060
```bash
61-
git tag v0.1 <sha>
62-
git tag v0 <sha>
61+
git tag v1.0 <sha>
62+
git tag v1 <sha>
6363
```
6464

6565
## Task 3: Push the Tags to GitHub
@@ -81,7 +81,7 @@ interact with tags. For now, you'll simply push the tags to GitHub.
8181

8282
![Tags](./img/2-tags.png)
8383

84-
1. Click the **v0.1.0** tag to view the annotated tag notes
84+
1. Click the **v1.0.0** tag to view the annotated tag notes
8585

8686
![Annotated Tag](./img/2-annotated-tag.png)
8787

labs/3-git-bisect.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ introduced, but you know it wasn't there when you first created the game.
3232
```
3333

3434
From the output of the above command, find a commit where the code change is
35-
not present and copy the commit hash.
35+
not present and copy the commit hash. You can simply select the earliest
36+
commit in the logs (the one labeled `Initial commit`).
3637

3738
1. Indicate a commit where you know the code does not contain the change you're
3839
looking for
@@ -61,11 +62,10 @@ ones.
6162
# Found
6263
$ grep -w "expect(true).toBe(false)" __tests__/keyboard_input_manager.test.ts
6364
expect(true).toBe(false);
64-
$
6565

6666
# Not found
6767
$ grep -w "expect(true).toBe(false)" __tests__/keyboard_input_manager.test.ts
68-
$
68+
6969
```
7070

7171
1. If the change is present, tell `git bisect` that the current commit is bad
@@ -128,6 +128,7 @@ ones.
128128
Make sure to replace `expect(true).toBe(false)` with the correct test code.
129129

130130
```typescript
131+
// Lab 3: Git Bisect
131132
const listen = jest
132133
.spyOn(KeyboardInputManager, 'listen')
133134
.mockImplementation(() => {})

labs/5-cherry-pick.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ feature branch and remove the commits from the default branch.
3535
1. Add the following code below the comment
3636

3737
```ts
38+
// Lab 5: New Game Button
3839
KeyboardInputManager.bindButtonPress(
3940
'.restart-button',
4041
KeyboardInputManager.restart

labs/7-github-flow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ into `main`.
3434
1. Update the input parameter to `GameManager` to `5` instead of `3`
3535

3636
```ts
37-
// Lab 6: Grid Size
37+
// Lab 7: Grid Size
3838
new GameManager(5)
3939
```
4040

labs/img/10-release-notes.png

202 KB
Loading

0 commit comments

Comments
 (0)