Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Make the runtime blog post's examples testable (#4279)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnunciato authored May 15, 2024
1 parent f6d9845 commit e101729
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/scheduled-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ jobs:
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.111.0"
extended: true

- name: Install Pulumi
uses: pulumi/actions@v4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
)

# Fetch some redirects from a hypothetical CMS.
response = requests.get(f"{os.environ['CMS_ENDPOINT']}/redirects.json")
endpoint = os.environ["CMS_ENDPOINT"] if "CMS_ENDPOINT" in os.environ else "https://gist.githubusercontent.com/cnunciato/013c2ffd2ced08fa31ab8c376d2d408e/raw/44f219160c8d9cd8febcaddd34fd5ac0b3631e02"
response = requests.get(f"{endpoint}/redirects.json")
redirects = json.loads(response.text)

# Create an S3 website redirect for each one.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ const homepage = new aws.s3.BucketObject(
);

// Fetch some redirects from a hypothetical CMS.
const redirects = fetch(`${process.env.CMS_ENDPOINT}/redirects.json`)
const endpoint = process.env.CMS_ENDPOINT ?? "https://gist.githubusercontent.com/cnunciato/013c2ffd2ced08fa31ab8c376d2d408e/raw/44f219160c8d9cd8febcaddd34fd5ac0b3631e02";
const redirects = fetch(`${endpoint}/redirects.json`)
.then(response => response.json())
.then(items =>
items.forEach((redirect: any, i: number) => {
Expand Down

0 comments on commit e101729

Please sign in to comment.