Repository navigation
ci: select Hurl examples by path #1537
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| # Shared changes run every examples/*/test.hurl, including newly added examples. | ||
| all_examples: | ||
| - 'examples/**' | ||
| - 'Dockerfile' | ||
| - '.dockerignore' | ||
| - 'Cargo.toml' | ||
| - 'Cargo.lock' | ||
| - 'build.rs' | ||
| - '.cargo/**' | ||
| - 'scripts/**' | ||
| - '.github/workflows/ci.yml' | ||
| - '.github/hurl-examples.yml' | ||
|
|
||
| # Keys are example folders; add one glob per line to associate more files. | ||
| # Keep suites with distinctive integration coverage; describe it above each entry. | ||
|
Comment on lines
+14
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a PR changes AGENTS.md reference: AGENTS.md:L36-L42 Useful? React with 👍 / 👎. |
||
|
|
||
| # Trace propagation through nginx and actual OTLP export into Tempo. | ||
| 'examples/telemetry': | ||
| - 'src/telemetry.rs' | ||
| - 'src/app_config.rs' | ||
| - 'src/main.rs' | ||
| - 'src/webserver/http.rs' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
A change to AGENTS.md reference: AGENTS.md:L49-L54 Useful? React with 👍 / 👎. |
||
| - 'src/webserver/http_client.rs' | ||
| - 'src/webserver/database/execute_queries.rs' | ||
|
|
||
| # Mailpit checks delivered MIME parts; the form asserts delayed multipart encoding. | ||
| 'examples/sending emails': | ||
| - 'src/app_config.rs' | ||
| - 'src/webserver/http_request_info.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/send_mail.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/uploaded_file_name.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/uploaded_file_path.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/read_file_as_data_url.rs' | ||
|
Comment on lines
+30
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When AGENTS.md reference: AGENTS.md:L25-L29 Useful? React with 👍 / 👎. |
||
| - 'sqlpage/templates/form.handlebars' | ||
|
|
||
| # Real Keycloak discovery, login, callback cookies, and identity claims in SQL. | ||
| 'examples/single sign on': | ||
| - 'src/app_config.rs' | ||
| - 'src/lib.rs' | ||
| - 'src/webserver/oidc.rs' | ||
| - 'src/webserver/http.rs' | ||
| - 'src/webserver/routing.rs' | ||
| - 'src/webserver/http_client.rs' | ||
| - 'src/webserver/http_request_info.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/user_info*.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/oidc_logout_url.rs' | ||
|
|
||
| # A real proxy connects to SQLPage's Unix socket and rewrites pretty URLs. | ||
| 'examples/nginx': | ||
| - 'src/app_config.rs' | ||
| - 'src/main.rs' | ||
| - 'src/webserver/http.rs' | ||
| - 'src/webserver/routing.rs' | ||
|
|
||
| # Apache proxies a site prefix, including the missing trailing slash redirect. | ||
| 'examples/web servers - apache': | ||
| - 'src/app_config.rs' | ||
| - 'src/webserver/http.rs' | ||
| - 'src/webserver/routing.rs' | ||
|
|
||
| # Load SpatiaLite's native library and use its spatial functions on pooled SQLite. | ||
| 'examples/make a geographic data application using sqlite extensions': | ||
| - 'src/app_config.rs' | ||
| - 'src/webserver/database/connect.rs' | ||
|
|
||
| # Create a PostgreSQL-backed page, request it, and render dynamic rows in a table. | ||
| 'examples/SQLPage developer user interface': | ||
| - 'src/filesystem.rs' | ||
| - 'src/file_cache.rs' | ||
| - 'src/webserver/routing.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/link.rs' | ||
| - 'sqlpage/templates/table.handlebars' | ||
|
|
||
| # Posted arrays feed MySQL JSON_TABLE; native JSON builds the select options. | ||
| 'examples/mysql json handling': | ||
| - 'src/webserver/http_request_info.rs' | ||
| - 'src/webserver/request_variables.rs' | ||
| - 'src/webserver/single_or_vec.rs' | ||
|
Comment on lines
+76
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
A change confined to AGENTS.md reference: AGENTS.md:L19-L24 Useful? React with 👍 / 👎. |
||
| - 'src/webserver/database/sql.rs' | ||
| - 'src/webserver/database/sql/**' | ||
| - 'src/webserver/database/execute_queries.rs' | ||
| - 'src/webserver/database/sql_to_json.rs' | ||
| - 'sqlpage/templates/form.handlebars' | ||
|
|
||
| # A real cookie jar round-trips an encoded space and removes it from a subfolder. | ||
| 'examples/read-and-set-http-cookies': | ||
| - 'src/render.rs' | ||
| - 'src/webserver/http_request_info.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/cookie.rs' | ||
|
Comment on lines
+85
to
+89
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When AGENTS.md reference: AGENTS.md:L25-L29 Useful? React with 👍 / 👎. |
||
|
|
||
| # Hash a new signup's password, authenticate it, and invalidate its login session. | ||
| 'examples/user-authentication': | ||
| - 'src/render.rs' | ||
| - 'src/webserver/http_request_info.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/hash_password.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/random_string.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/cookie.rs' | ||
|
|
||
| # Authenticated multipart upload persists an image into a writable container mount. | ||
| 'examples/image gallery with user uploads': | ||
| - 'src/app_config.rs' | ||
| - 'src/webserver/http_request_info.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/persist_uploaded_file.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/uploaded_file_mime_type.rs' | ||
| - 'src/webserver/database/sqlpage_functions/functions/random_string.rs' | ||
|
|
||
| # JSON menus with icon-only submenus and arrays of custom scripts/styles. | ||
| 'examples/CRUD - Authentication': ['sqlpage/templates/shell.handlebars'] | ||
|
|
||
| # Cards combine Markdown and remote chart/map/table embed markup. | ||
| 'examples/cards-with-remote-content': ['sqlpage/templates/card.handlebars'] | ||
|
Comment on lines
+110
to
+111
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When AGENTS.md reference: AGENTS.md:L25-L29 Useful? React with 👍 / 👎. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| if [[ "${PATHS_OUTCOME:-}" == success && "${ALL_EXAMPLES:-}" != true ]]; then | ||
| examples="$MATCHED_EXAMPLES" | ||
| else | ||
| # Tags, missing diff bases, and failed path filtering run every example. | ||
| examples="$(find examples -mindepth 2 -maxdepth 2 -name test.hurl -print \ | ||
| | sed 's#/test.hurl$##' | sort | jq -R -s -c 'split("\n")[:-1]')" | ||
| fi | ||
|
|
||
| echo "examples=$examples" >> "$GITHUB_OUTPUT" | ||
| echo "Selected Hurl examples: $examples" >> "$GITHUB_STEP_SUMMARY" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
all_examplesfilter omitssqlpage/**, so a PR that changes only a built-in Handlebars component produces[]and skips every Hurl suite. These templates are embedded into the binary and consumed throughout the examples—for instance, the cards and forms suites assert their rendered HTML—so template regressions that appear only in complete example flows will no longer be exercised; addsqlpage/**(or at leastsqlpage/templates/**) to this filter.AGENTS.md reference: AGENTS.md:L36-L42
Useful? React with 👍 / 👎.