-
Notifications
You must be signed in to change notification settings - Fork 324
chore(ci): add code-block testing workflow #6810
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
+1,784
−1
Merged
Changes from 5 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b569d09
chore(ci): add code-block testing workflow
claude 8925058
feat(test): add performance optimization for code block tests
claude d739d58
Merge branch 'master' into claude/add-codeblock-ci-tests-jRvG9
jstirnaman ae646cb
Update .github/workflows/test.yml
jstirnaman 83db31c
Replace default CI test products with Core and Telegraf (#6812)
Copilot 0c192e8
fix(ci): detect harness changes and map to default test group
jstirnaman 8bf3119
feat(ci): start InfluxDB 3 Core with preconfigured token for live tests
jstirnaman 92dae38
fix(ci): chmod data dirs so influxdb3:3-core container can write
jstirnaman 1a77404
fix(ci): make admin token file world-readable for compose secret mount
jstirnaman cd28bb0
fix(ci): authenticate readiness probe; /ping requires token in Core 3.9+
jstirnaman a1d84a5
chore(ci): make code-block test job truly non-blocking
jstirnaman dff9e63
feat(ci): add influxdb3-enterprise-pytest compose service
jstirnaman 398cff7
feat(ci): run InfluxDB 3 Enterprise live tests with preconfigured token
jstirnaman c009b92
chore(ci): run default code-block test group in parallel
jstirnaman 113417c
feat(ci): gate Enterprise pytest on pre-verified license blob; filter…
jstirnaman c03cc89
docs(testing): document CI code-block workflow and Enterprise activation
jstirnaman bf5e8f8
Merge remote-tracking branch 'origin/master' into claude/add-codebloc…
jstirnaman db569f1
feat(ci): include influxdb3_enterprise in default product group
jstirnaman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,7 @@ test-results.xml | |
| /influxdb3cli-build-scripts/content | ||
| tmp | ||
| .tmp | ||
| .test-cache | ||
|
|
||
| # IDE files | ||
| .vscode/* | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| #!/usr/bin/env node | ||
| /** | ||
| * Detect which products need testing based on changed content files. | ||
| * | ||
| * Usage: | ||
| * echo "content/influxdb3/core/page.md" | node scripts/ci/detect-test-products.js | ||
| * node scripts/ci/detect-test-products.js < changed-files.txt | ||
| * | ||
| * Output (JSON): | ||
| * {"products":["influxdb3_core","telegraf"],"files":["content/influxdb3/core/page.md",...]} | ||
| * | ||
| * This script: | ||
| * 1. Reads changed file paths from stdin (one per line) | ||
| * 2. Expands shared content changes to find all affected product pages | ||
| * 3. Extracts unique products from the affected file paths | ||
| * 4. Outputs JSON with products array and expanded files array | ||
| */ | ||
|
|
||
| import { expandSharedContentChanges } from '../lib/content-utils.js'; | ||
|
|
||
| // Product path mappings | ||
| const PRODUCT_PATTERNS = [ | ||
| { pattern: /^content\/influxdb3\/core\//, product: 'influxdb3_core' }, | ||
| { pattern: /^content\/influxdb3\/enterprise\//, product: 'influxdb3_enterprise' }, | ||
| { pattern: /^content\/influxdb3\/cloud-dedicated\//, product: 'cloud-dedicated' }, | ||
| { pattern: /^content\/influxdb3\/cloud-serverless\//, product: 'cloud-serverless' }, | ||
| { pattern: /^content\/influxdb3\/clustered\//, product: 'clustered' }, | ||
| { pattern: /^content\/influxdb3\/explorer\//, product: 'explorer' }, | ||
| { pattern: /^content\/influxdb\/cloud\//, product: 'cloud' }, | ||
| { pattern: /^content\/influxdb\/v2\//, product: 'v2' }, | ||
| { pattern: /^content\/influxdb\/v1\//, product: 'v1' }, | ||
| { pattern: /^content\/telegraf\//, product: 'telegraf' }, | ||
| ]; | ||
|
|
||
| /** | ||
| * Extract product identifier from a content file path | ||
| * @param {string} filePath - Content file path | ||
| * @returns {string|null} Product identifier or null | ||
| */ | ||
| function getProductFromPath(filePath) { | ||
| for (const { pattern, product } of PRODUCT_PATTERNS) { | ||
| if (pattern.test(filePath)) { | ||
| return product; | ||
| } | ||
| } | ||
| return null; | ||
| } | ||
|
|
||
| /** | ||
| * Main function | ||
| */ | ||
| async function main() { | ||
| // Read changed files from stdin | ||
| const input = await new Promise((resolve) => { | ||
| let data = ''; | ||
| process.stdin.setEncoding('utf8'); | ||
| process.stdin.on('data', (chunk) => (data += chunk)); | ||
| process.stdin.on('end', () => resolve(data)); | ||
|
|
||
| // Handle case where stdin is empty/closed immediately | ||
| if (process.stdin.isTTY) { | ||
| resolve(''); | ||
| } | ||
| }); | ||
|
|
||
| const changedFiles = input | ||
| .trim() | ||
| .split('\n') | ||
| .filter((f) => f && f.endsWith('.md')); | ||
|
|
||
| if (changedFiles.length === 0) { | ||
| console.log(JSON.stringify({ products: [], files: [] })); | ||
| process.exit(0); | ||
| } | ||
|
|
||
| // Expand shared content changes to find all affected pages | ||
| const verbose = process.env.VERBOSE === 'true'; | ||
| const expandedFiles = expandSharedContentChanges(changedFiles, { verbose }); | ||
|
|
||
| // Extract unique products from expanded file list | ||
| const products = new Set(); | ||
| for (const file of expandedFiles) { | ||
| const product = getProductFromPath(file); | ||
| if (product) { | ||
| products.add(product); | ||
| } | ||
| } | ||
|
|
||
| // Output JSON result | ||
| const result = { | ||
| products: Array.from(products).sort(), | ||
| files: expandedFiles.sort(), | ||
| }; | ||
|
|
||
| console.log(JSON.stringify(result)); | ||
| } | ||
|
|
||
| main().catch((err) => { | ||
| console.error('Error:', err.message); | ||
| process.exit(1); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.