Skip to content

Commit 817a6db

Browse files
committed
updated to use exec and setup v2.2.1
1 parent 306ceba commit 817a6db

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ The `stackql/stackql-assert` action is an composite action that runs a `stackql`
66

77
# Usage
88

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+
911
## Provider Authentication
1012
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).
1113

1214
## 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)*
2224

2325
**__NOTE:__ one of `expected_rows`, `expected_results_str` or `expected_results_file_path` is required**
2426

@@ -30,7 +32,7 @@ Authentication to StackQL providers is done via environment variables source fro
3032
## Expected Result
3133
- 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.
3234
- 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)
3436

3537
## Examples
3638
The following excerpts from a GitHub Actions workflow demonstrate how to use the `stackql/stackql-assert` action.

0 commit comments

Comments
 (0)