You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-10Lines changed: 12 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -6,19 +6,21 @@ The `stackql/stackql-assert` action is an composite action that runs a `stackql`
6
6
7
7
# Usage
8
8
9
+
> This action uses the [setup-stackql](https://github.com/marketplace/actions/stackql-studios-setup-stackql) and [stackql-exec](https://github.com/marketplace/actions/stackql-studios-stackql-exec) actions
10
+
9
11
## Provider Authentication
10
12
Authentication to StackQL providers is done via environment variables source from GitHub Actions Secrets. To learn more about authentication, see the setup instructions for your provider or providers at the [StackQL Provider Registry Docs](https://stackql.io/registry).
11
13
12
14
## Inputs
13
-
-`test_query` - stackql query to execute **(need to supply either `test_query` or `test_query_file_path`)**
14
-
-`test_query_file_path` - stackql query file to execute **(need to supply either `test_query` or `test_query_file_path`)**
15
-
-`data_file_path` - (optional) path to data file to pass to the stackql query preprocessor (`json` or `jsonnet`)
16
-
-`vars` - (optional) comma delimited list of variables to pass to the stackql query preprocessor (supported with `jsonnet` config blocks or `jsonnet` data files only), accepts `var1=val1,var2=val2`, can be used to source environment variables into stackql queries
17
-
-`expected_rows` - (optional) Expected number of rows in the result.
18
-
-`expected_results_str` - (optional) Expected result (`json`) from executing test query, support object string (overrides `expected_results_file_path`)
19
-
-`expected_results_file_path` - (optional) Results file (`json`) that stores expected result, json is support
20
-
-`auth_obj_path` - (optional) the path of json file that stores stackql AUTH string **(only required when using non-standard environment variable names)**
21
-
-`auth_str` - (optional) stackql AUTH string **(only required when using non-standard environment variable names)**
15
+
-**`test_query`** - stackql query to execute *(need to supply either `test_query` or `test_query_file_path`)*
16
+
-**`test_query_file_path`** - stackql query file to execute *(need to supply either `test_query` or `test_query_file_path`)*
17
+
-**`data_file_path`** - (optional) path to data file to pass to the stackql query preprocessor (`json` or `jsonnet`)
18
+
-**`vars`** - (optional) comma delimited list of variables to pass to the stackql query preprocessor (supported with `jsonnet` config blocks or `jsonnet` data files only), accepts `var1=val1,var2=val2`, can be used to source environment variables into stackql queries
19
+
-**`expected_rows`** - (optional) Expected number of rows in the result.
20
+
-**`expected_results_str`** - (optional) Expected result (`json`) from executing test query, support object string (overrides `expected_results_file_path`)
21
+
-**`expected_results_file_path`** - (optional) Results file (`json`) that stores expected result, json is support
22
+
-**`auth_obj_path`** - (optional) the path of json file that stores stackql AUTH string *(only required when using non-standard environment variable names)*
23
+
-**`auth_str`** - (optional) stackql AUTH string *(only required when using non-standard environment variable names)*
22
24
23
25
**__NOTE:__ one of `expected_rows`, `expected_results_str` or `expected_results_file_path` is required**
24
26
@@ -30,7 +32,7 @@ Authentication to StackQL providers is done via environment variables source fro
30
32
## Expected Result
31
33
- Use `expected_results_str` or `expected_results_file_path` or `expected_rows` to pass the expected result to the action. The expected result (`expected_results_str` or `expected_results_file_path`) should be a valid `json` object. The action will compare the result with the expected result. If the result is not the same as the expected result, the action will fail the step.
32
34
- Either `expected_results_str` or `expected_results_file_path` or `expected_rows` are required. If `expected_results_str` and `expected_results_file_path` are provided, `expected_results_str` will be used.
33
-
- Expected result example can be found in [example workflow](./.github/workflows/stackql-assert.yml) and [example .json file](./.github/workflows/workflow_scripts)
35
+
- Expected result example can be found in [example workflow](./.github/workflows/stackql-assert-test.yml) and [example .json file](./.github/workflows/workflow_scripts)
34
36
35
37
## Examples
36
38
The following excerpts from a GitHub Actions workflow demonstrate how to use the `stackql/stackql-assert` action.
0 commit comments