-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (50 loc) · 1.76 KB
/
sanity.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Sanity Tests
on: push
jobs:
test_multiple_queries:
runs-on: ubuntu-latest
name: Test Function Multiple Queries
steps:
# Run Queries
- name: Checkout Repository
uses: actions/checkout@v2
- name: Run Queries
uses: ./
id: run_queries
with:
snowflake_account: ${{ secrets.SNOWFLAKE_ACCOUNT }}
snowflake_warehouse: ${{ secrets.SNOWFLAKE_WAREHOUSE }}
snowflake_username: ${{ secrets.SNOWFLAKE_USERNAME }}
snowflake_password: ${{ secrets.SNOWFLAKE_PASSWORD }}
queries: 'call system$wait(1);
select CURRENT_VERSION();
select CURRENT_CLIENT()'
# Validations
- name: Query Client validation
run: |
${{contains(steps.run_queries.outputs.queries_results, 'PythonConnector')}}
- name: Waiting Query Validation
run: |
${{contains(steps.run_queries.outputs.queries_results, 'waited 1 seconds')}}
test_matrix_query:
runs-on: ubuntu-latest
name: Test Matrix Multiple Queries
strategy:
matrix:
sleep: [1, 2, 3]
steps:
# Run Queries
- name: Checkout Repository
uses: actions/checkout@v2
- name: Run Queries
uses: ./
id: run_queries
with:
snowflake_account: ${{ secrets.SNOWFLAKE_ACCOUNT }}
snowflake_warehouse: ${{ secrets.SNOWFLAKE_WAREHOUSE }}
snowflake_username: ${{ secrets.SNOWFLAKE_USERNAME }}
snowflake_password: ${{ secrets.SNOWFLAKE_PASSWORD }}
queries: 'call system$wait(${{matrix.sleep}})'
- name: Waiting Query Validation
run: |
${{contains(steps.run_queries.outputs.queries_results, format('waited {0} seconds', matrix.sleep))}}