Skip to content

Examples: Add an example which uses a resource bundle #82

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

Merged
merged 4 commits into from
Apr 14, 2025

Conversation

euanh
Copy link
Collaborator

@euanh euanh commented Apr 11, 2025

Motivation

An example showing how to use resources (#78) is helpful for new users and can be used as an end to end tests for this feature.

Modifications

  • Add a new HelloWorldWithResources example
  • Add the new example to the End to end tests GitHub Actions job
  • Restructure the end to end tests to check the HTTP response code instead of the content which is returned, because the new test returns one of 3 JPEGs selected at random, whereas the existing tests returned strings.
  • Adopt the code structure used by the official Hummingbird examples, to make it more familiar to users who are used to the official examples.

Result

  • The repository contains a new example showing how to use resources in a container image
  • The resource feature is tested as part of the automated end to end test suite.

Test Plan

The new test passes and all existing tests continue to pass.

@euanh euanh added area/documentation Improvements or additions to documentation semver/none No version bump required. area/testing Improvements to tests. labels Apr 11, 2025
@euanh euanh force-pushed the docs/resources-example branch from 3df6353 to 9e8e77d Compare April 11, 2025 16:34
@euanh euanh force-pushed the docs/resources-example branch from 9e8e77d to fcee423 Compare April 14, 2025 07:19
@euanh euanh changed the title Docs/resources example Examples: Add an example which uses a resource bundle Apr 14, 2025
@euanh euanh force-pushed the docs/resources-example branch from fcee423 to 0baeba2 Compare April 14, 2025 07:54
@euanh euanh merged commit 2533fd5 into apple:main Apr 14, 2025
23 checks passed
@euanh euanh deleted the docs/resources-example branch April 14, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation area/testing Improvements to tests. semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant