Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cue tutorial to use testscript #410

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

glarizza
Copy link
Contributor

PROBLEM:

The "Cue" tutorial has hardcoded code blocks and hasn't been
updated to use the automated testscript workflow.

NOTE: This is slightly more complex than normal because we need
to make sure Timoni is installed when we execute the testscripts
due to the fact that we need to execute timoni mod vendor crds ...
and capture the output.

SOLUTION:

  • Add Timoni as one of the packages that are installed via make go-deps.
  • Update the testing GH Action to install all go dependencies before executing the tests.
  • Create a test for the Cue tutorial.
  • Create a testscript for the Cue test.
  • Update the Cue MDX file to load in data from the testscript directory.

OUTCOME:

The code content in the Cue tutorial now comes directly from the
testscript workflow.

Copy link

cloudflare-workers-and-pages bot commented Jan 23, 2025

Deploying holos with  Cloudflare Pages  Cloudflare Pages

Latest commit: ae4aad4
Status: ✅  Deploy successful!
Preview URL: https://69fdef92.holos.pages.dev
Branch Preview URL: https://gl-embed-timoni-for-tests.holos.pages.dev

View logs

@glarizza glarizza force-pushed the gl/embed-timoni-for-tests branch from b76e825 to 93ced64 Compare January 23, 2025 23:31
@@ -1,3 +1,7 @@
#! /bin/bash
set -xeuo pipefail

# Necessary to install timoni for testscript execution
make go-deps
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we're running make go-deps now during the test script. Total execution time of installing deps and running the tests is about 3 minutes.

@glarizza glarizza requested review from jeffmccune and removed request for jeffmccune January 23, 2025 23:34
@glarizza glarizza marked this pull request as draft January 23, 2025 23:35
PROBLEM:

The "Cue" tutorial has hardcoded code blocks and hasn't been
updated to use the automated testscript workflow.

NOTE: This is slightly more complex than normal because we need
to make sure Timoni is installed when we execute the testscripts
due to the fact that we need to execute `timoni mod vendor crds ...`
and capture the output.

SOLUTION:

* Add Timoni as one of the packages that are installed via `make go-deps`.
* Update the testing GH Action to install all go dependencies before executing the tests.
* Create a test for the Cue tutorial.
* Create a testscript for the Cue test.
* Update the Cue MDX file to load in data from the testscript directory.

OUTCOME:

The code content in the Cue tutorial now comes directly from the
testscript workflow.
@glarizza glarizza force-pushed the gl/embed-timoni-for-tests branch from 93ced64 to ae4aad4 Compare January 23, 2025 23:49
@glarizza glarizza requested a review from jeffmccune January 23, 2025 23:53
@glarizza glarizza marked this pull request as ready for review January 23, 2025 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant