Skip to content

Commit b86ea32

Browse files
committed
async server tests
1 parent 6d470c7 commit b86ea32

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/async_server_tests.yaml.disabled renamed to .github/workflows/async_server_tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
matrix:
1111
os:
1212
- ubuntu-latest
13-
# - windows-latest
14-
# - macos-latest
13+
- windows-latest
14+
- macos-latest
1515
python-version:
1616
- "3.7"
1717
- "3.8"

pystackql/stackql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,8 @@ async def executeQueriesAsync(self, queries):
559559
Note:
560560
- When operating in `server_mode`, this method is not supported.
561561
"""
562-
if self.server_mode:
563-
raise ValueError("executeQueriesAsync are not supported in sever_mode.")
562+
# if self.server_mode:
563+
# raise ValueError("executeQueriesAsync are not supported in sever_mode.")
564564
if self.output not in ['dict', 'pandas']:
565565
raise ValueError("executeQueriesAsync supports only 'dict' or 'pandas' output modes.")
566566
async def main():

tests/pystackql_tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ class PyStackQLTestsBase(unittest.TestCase):
3131
def setUpModule():
3232
print("downloading stackql binary...")
3333
PyStackQLTestsBase.stackql = StackQL()
34+
# Check whether code is running in GitHub Actions
35+
is_github_actions = os.environ.get('GITHUB_ACTIONS') == 'true'
36+
37+
if not is_github_actions:
38+
# Ensure you have the latest version of stackql, only when running locally
39+
print("Running tests outside of GitHub Actions, upgrading stackql binary...")
40+
PyStackQLTestsBase.stackql.upgrade()
41+
3442
print("downloading aws provider for tests...")
3543
res = PyStackQLTestsBase.stackql.executeStmt(registry_pull_aws_query)
3644
print(res)

0 commit comments

Comments
 (0)