Skip to content

Commit ce14043

Browse files
GeekTrainerCopilot
andcommitted
Merge main into simplify-client-app
Resolve conflicts: - .gitignore, README.md: keep simplify branch versions - content/github-actions/: take main's updated content - Update github-actions content paths from client/ and server/ to app/client/ and app/server/ to match new folder structure Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 parents bb2575c + 761ead3 commit ce14043

File tree

11 files changed

+34
-36
lines changed

11 files changed

+34
-36
lines changed

content/github-actions/1-introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Let's start with the classic "Hello World" — a workflow you can trigger manual
6868

6969
Now let's push the workflow and trigger it by hand.
7070

71-
1. Open the terminal in your codespace by pressing <kbd>Ctrl</kbd>+<kbd>`</kbd>.
71+
1. Open the terminal in your codespace by pressing <kbd>Ctl</kbd>+<kbd>`</kbd>.
7272
2. Stage and commit your changes:
7373

7474
```bash

content/github-actions/2-code-scanning.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Most projects depend on open source and external libraries. While modern develop
3535
Public repositories on GitHub automatically have Dependabot alerts enabled. Let's configure Dependabot to also create PRs that update insecure library versions automatically.
3636

3737
1. Navigate to your repository on GitHub.
38-
2. Select **Settings** > **Code security** (under **Security** in the sidebar).
38+
2. Select **Settings** > **Advanced security** (under **Security** in the sidebar).
3939
3. Locate the **Dependabot** section.
4040

4141
![Screenshot of the Dependabot section](../shared-images/dependabot-settings.png)
@@ -54,11 +54,11 @@ You've now enabled Dependabot alerts and security updates! When an insecure libr
5454

5555
Many developers have accidentally checked in code containing tokens or credentials. Regardless of the reason, even seemingly innocuous tokens can create a security issue. [Secret scanning][about-secret-scanning] detects tokens in your source code and raises alerts. With push protection enabled, pushes containing supported secrets are blocked before they reach your repository.
5656

57-
1. On the same **Code security** settings page, locate the **Secret scanning** section.
58-
2. Next to **Receive alerts on GitHub for detected secrets, keys or other tokens**, select **Enable**.
57+
1. On the same **Advanced security** settings page, locate the **Secret Protection** section.
58+
2. Next to **GitHub will always send alerts to partners for detected secrets in public repositories**, select **Enable**.
5959
3. Next to **Push protection**, select **Enable** to block pushes containing a [supported secret][supported-secrets].
6060

61-
![Screenshot of fully configured secret scanning](../shared-images/secret-scanning-settings.png)
61+
![Screenshot of fully configured secret scanning](../shared-images/setup-secret-protection.png)
6262

6363
You've now enabled secret scanning and push protection — helping prevent credentials from reaching your repository.
6464

@@ -68,7 +68,7 @@ There is a direct relationship between the amount of code an organization writes
6868

6969
Let's enable code scanning with the default CodeQL setup. This runs automatically whenever code is pushed to `main` or a pull request targets `main`, and on a regular schedule to catch newly discovered vulnerabilities.
7070

71-
1. On the same **Code security** settings page, locate the **Code scanning** section.
71+
1. On the same **Advanced security** settings page, locate the **Code scanning** section.
7272
2. Next to **CodeQL analysis**, select **Set up** > **Default**.
7373

7474
![Screenshot of code scanning dropdown menu](../shared-images/code-scanning-setup.png)

content/github-actions/3-running-tests.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Let's build that out!
7373
pip install -r app/server/requirements.txt
7474
7575
- name: Run tests
76-
working-directory: ./app/server
76+
working-directory: ./server
7777
run: |
7878
python -m unittest test_app -v
7979
```
@@ -101,7 +101,7 @@ The **`permissions`** block controls what this token can do. For our CI workflow
101101

102102
A bit later you'll use a more standard branching approach for changes. But for our purposes right now, let's push straight to `main`. What you'll notice is the workflow will automatically run, since the workflow will now exist on `main`!
103103

104-
1. Open the terminal in your codespace by pressing <kbd>Ctrl</kbd>+<kbd>`</kbd>, then stage, commit, and push:
104+
1. Open the terminal in your codespace by pressing <kbd>Ctl</kbd>+<kbd>`</kbd>, then stage, commit, and push:
105105

106106
```bash
107107
git add .github/workflows/run-tests.yml
@@ -141,15 +141,15 @@ The unit tests cover the API, but the shelter also has Playwright e2e tests that
141141
node-version: '20'
142142
143143
- name: Install Node dependencies
144-
working-directory: ./app/client
144+
working-directory: ./client
145145
run: npm ci
146146
147147
- name: Install Playwright browsers
148-
working-directory: ./app/client
148+
working-directory: ./client
149149
run: npx playwright install --with-deps chromium
150150
151151
- name: Run e2e tests
152-
working-directory: ./app/client
152+
working-directory: ./client
153153
run: npx playwright test
154154
```
155155

content/github-actions/4-caching.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
| [← Running Tests][walkthrough-previous] | [Next: Matrix Strategies & Parallel Testing →][walkthrough-next] |
44
|:-----------------------------------|------------------------------------------:|
55

6-
**Caching** is a technique to speed up your workflows by reusing previously downloaded dependencies instead of fetching them from the internet on every run. This exercise teaches you how to cache Python packages and Node modules so your CI pipeline stays fast as your project grows.
6+
The [GitHub Actions Marketplace][actions-marketplace] is a collection of pre-built actions created by GitHub and the community. Actions can set up tools, run tests, deploy code, send notifications, and much more. Rather than writing everything from scratch, you can leverage the work of thousands of developers.
77

8-
Along the way you'll also browse the [GitHub Actions Marketplace][actions-marketplace] — a collection of pre-built actions created by GitHub and the community that you can drop into any workflow.
8+
In this exercise you'll also learn about **caching** — a technique to speed up your workflows by reusing previously downloaded dependencies instead of fetching them from the internet on every run.
99

1010
## Scenario
1111

@@ -71,7 +71,7 @@ The e2e job has two dependencies to cache — Python packages and the Node modul
7171

7272
Now let's push the changes and see the impact of caching.
7373

74-
1. In the terminal (<kbd>Ctrl</kbd>+<kbd>`</kbd> to toggle), stage, commit, and push your changes:
74+
1. In the terminal (<kbd>Ctl</kbd>+<kbd>`</kbd> to toggle), stage, commit, and push your changes:
7575

7676
```bash
7777
git add .github/workflows/run-tests.yml

content/github-actions/5-matrix-strategies.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ Let's update the CI workflow to test the API across multiple Python versions.
4444
pip install -r app/server/requirements.txt
4545
4646
- name: Run tests
47-
working-directory: ./app/server
47+
working-directory: ./server
4848
run: |
4949
python -m unittest test_app -v
5050
```
5151
5252
> [!IMPORTANT]
5353
> Make sure to quote version numbers like `'3.12'` in the matrix array. Without quotes, YAML may interpret them as floating-point numbers — for example, `3.10` becomes `3.1`, which would cause the setup step to fail.
5454

55-
5. In the terminal (<kbd>Ctrl</kbd>+<kbd>`</kbd> to toggle), stage, commit, and push your changes:
55+
5. In the terminal (<kbd>Ctl</kbd>+<kbd>`</kbd> to toggle), stage, commit, and push your changes:
5656

5757
```bash
5858
git add .github/workflows/run-tests.yml
@@ -126,6 +126,6 @@ Matrix strategies let you test across multiple configurations — language versi
126126
|:-----------------------------------|------------------------------------------:|
127127

128128
[matrix-docs]: https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs
129-
[strategy-syntax]: https://docs.github.com/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategy
129+
[strategy-syntax]: https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategy
130130
[walkthrough-previous]: 4-caching.md
131131
[walkthrough-next]: 6-deploy-azure.md

content/github-actions/6-deploy-azure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ There are several strategies for ensuring only validated code reaches production
3030

3131
Let's set up the Azure Developer CLI and scaffold the infrastructure for our project.
3232

33-
1. Open the terminal in your codespace (or press <kbd>Ctrl</kbd>+<kbd>`</kbd> to toggle it).
33+
1. Open the terminal in your codespace (or press <kbd>Ctl</kbd>+<kbd>`</kbd> to toggle it).
3434
2. Install azd by running:
3535

3636
```bash

content/github-actions/7-custom-actions.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Inputs and outputs let the action communicate with the calling workflow, making
2929

3030
Let's create a composite action that sets up Python, installs dependencies, and seeds the test database.
3131

32-
1. In your codespace, open a terminal window by selecting <kbd>Ctrl</kbd>+<kbd>\`</kbd>.
32+
1. In your codespace, open a terminal window by selecting <kbd>Ctl</kbd>+<kbd>\`</kbd>.
3333
2. Create the directory for the action by executing the following command in the terminal:
3434

3535
```bash
@@ -65,7 +65,7 @@ Let's create a composite action that sets up Python, installs dependencies, and
6565
uses: actions/setup-python@v5
6666
with:
6767
python-version: ${{ inputs.python-version }}
68-
cache: 'pip'
68+
6969
- name: Install dependencies
7070
run: pip install -r app/server/requirements.txt
7171
shell: bash
@@ -117,7 +117,7 @@ Now let's update the CI workflow to use the custom action instead of the individ
117117
```yaml
118118
- name: Run tests
119119
run: python -m unittest test_app -v
120-
working-directory: ./app/server
120+
working-directory: ./server
121121
env:
122122
DATABASE_PATH: ${{ steps.seed.outputs.database-file }}
123123
```
@@ -136,7 +136,7 @@ Now let's update the CI workflow to use the custom action instead of the individ
136136
137137
```yaml
138138
- name: Run e2e tests
139-
working-directory: ./app/client
139+
working-directory: ./client
140140
run: npx playwright test
141141
env:
142142
DATABASE_PATH: ${{ steps.seed.outputs.database-file }}
@@ -176,7 +176,7 @@ Now let's update the CI workflow to use the custom action instead of the individ
176176
177177
- name: Run tests
178178
run: python -m unittest test_app -v
179-
working-directory: ./app/server
179+
working-directory: ./server
180180
env:
181181
DATABASE_PATH: ${{ steps.seed.outputs.database-file }}
182182
@@ -200,21 +200,21 @@ Now let's update the CI workflow to use the custom action instead of the individ
200200
cache-dependency-path: 'app/client/package-lock.json'
201201
202202
- name: Install Node dependencies
203-
working-directory: ./app/client
203+
working-directory: ./client
204204
run: npm ci
205205
206206
- name: Install Playwright browsers
207-
working-directory: ./app/client
207+
working-directory: ./client
208208
run: npx playwright install --with-deps chromium
209209
210210
- name: Run e2e tests
211-
working-directory: ./app/client
211+
working-directory: ./client
212212
run: npx playwright test
213213
env:
214214
DATABASE_PATH: ${{ steps.seed.outputs.database-file }}
215215
```
216216

217-
6. In the terminal (<kbd>Ctrl</kbd>+<kbd>`</kbd> to toggle), commit and push your changes:
217+
6. In the terminal (<kbd>Ctl</kbd>+<kbd>`</kbd> to toggle), commit and push your changes:
218218
219219
```bash
220220
git add .github/actions/setup-python-env/action.yml .github/workflows/run-tests.yml

content/github-actions/8-reusable-workflows.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ A **composite action** combines multiple *steps* into a single step that runs in
2525
| **Runner control** | Runs on the caller job's runner | Each job specifies its own runner |
2626
| **Secrets** | Cannot access secrets directly | Can receive secrets via `secrets:` or `secrets: inherit` |
2727
| **Logging** | Appears as one collapsed step in the log | Every job and step is logged individually |
28-
| **Nesting depth** | Up to 10 composite actions per workflow | Up to 4 levels of workflow nesting |
28+
| **Nesting depth** | Up to 10 composite actions per workflow | Up to 10 levels of workflow nesting |
2929
| **Marketplace** | Can be published to the [Actions Marketplace][actions-marketplace] | Cannot be published to the Marketplace |
3030

3131
**When to use which:**
@@ -69,7 +69,7 @@ on:
6969
required: true
7070
```
7171
72-
The caller then passes each secret explicitly:
72+
Then caller then passes each secret explicitly:
7373
7474
```yaml
7575
deploy:
@@ -84,8 +84,6 @@ deploy:
8484
8585
> [!IMPORTANT]
8686
> For deployment workflows that need Azure credentials, `secrets: inherit` is the simplest approach. However, defining specific secrets provides better documentation and prevents accidentally exposing secrets the reusable workflow doesn't need. We'll use `secrets: inherit` in this exercise for simplicity.
87-
>
88-
> Note: In this workshop, `azd pipeline config` stored the Azure credentials as **repository variables** (accessed via `vars.*`), not secrets. The example above illustrates the pattern for cases where credentials _are_ stored as secrets.
8987

9088
## Create a reusable deployment workflow
9189

@@ -205,7 +203,7 @@ Now let's add the second caller — a manual deploy workflow for rollbacks and h
205203

206204
This workflow is only triggered **manually** via `workflow_dispatch` — it appears as a "Run workflow" button in the Actions tab. It prompts for a **git ref** (a commit SHA, tag, or branch name to deploy), passes that ref to the reusable workflow's `deploy-ref` input, and uses the same deploy logic as the automated pipeline.
207205

208-
3. In the terminal (<kbd>Ctrl</kbd>+<kbd>`</kbd> to toggle), commit and push your changes:
206+
3. In the terminal (<kbd>Ctl</kbd>+<kbd>`</kbd> to toggle), commit and push your changes:
209207

210208
```bash
211209
git add .github/workflows/reusable-deploy.yml .github/workflows/azure-dev.yml .github/workflows/manual-deploy.yml

content/github-actions/9-required-workflows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Let's create a ruleset that requires our tests to pass, and pull requests to be
9494

9595
Let's verify the ruleset is working.
9696

97-
1. Return to your codespace and open the terminal (<kbd>Ctrl</kbd>+<kbd>`</kbd> to toggle). Create a new branch and make a small change:
97+
1. Return to your codespace and open the terminal (<kbd>Ctl</kbd>+<kbd>`</kbd> to toggle). Create a new branch and make a small change:
9898

9999
```bash
100100
git checkout -b test-ruleset
@@ -146,7 +146,7 @@ This pipeline follows the same patterns used by teams across GitHub. As the shel
146146

147147
If you want to keep exploring, here are some suggested next steps:
148148

149-
- Add a custom CodeQL workflow using [GitHub Advanced Security][github-security].
149+
- Add a code scanning workflow using [GitHub Advanced Security][github-security].
150150
- Explore [GitHub Environments][environments-docs] with deployment protection rules for staged deployments (e.g., staging → production with manual approval).
151151
- Explore the [GitHub Actions Marketplace][actions-marketplace] for community-built actions.
152152
- Take the [GitHub Skills: Deploy to Azure][skills-deploy-azure] course for a deeper dive into Azure deployment.

content/github-actions/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To complete this workshop, you will need the following:
2626
1. [Introduction & Your First Workflow][introduction] — Create your first workflow and explore the Actions UI
2727
2. [Securing the Development Pipeline][code-scanning] — Enable code scanning, Dependabot, and secret scanning
2828
3. [Running Tests][ci] — Automate unit and e2e testing with parallel jobs
29-
4. [Caching][caching] — Speed up workflows by caching dependencies
29+
4. [Caching][marketplace] — Speed up workflows by caching dependencies
3030
5. [Matrix strategies & parallel testing][matrix] — Test across multiple configurations simultaneously
3131
6. [Deploying to Azure with azd][deployment] — Set up continuous deployment to Azure
3232
7. [Creating custom actions][custom-actions] — Build your own reusable action
@@ -57,7 +57,7 @@ To complete this workshop, you will need the following:
5757
[github-copilot]: https://github.com/features/copilot
5858
[github-signup]: https://github.com/join
5959
[introduction]: ./1-introduction.md
60-
[caching]: ./4-caching.md
60+
[marketplace]: ./4-caching.md
6161
[matrix]: ./5-matrix-strategies.md
6262
[protection]: ./9-required-workflows.md
6363
[repo-root]: /

0 commit comments

Comments
 (0)