File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+ branches :
4
+ - master
5
+ pull_request :
6
+ name : Run Spanner integration tests against emulator
7
+ jobs :
8
+ system-tests :
9
+ runs-on : ubuntu-latest
10
+
11
+ services :
12
+ emulator :
13
+ image : gcr.io/cloud-spanner-emulator/emulator:latest
14
+ ports :
15
+ - 9010:9010
16
+ - 9020:9020
17
+
18
+ steps :
19
+ - name : Checkout code
20
+ uses : actions/checkout@v2
21
+ - name : Setup Python
22
+ uses : actions/setup-python@v2
23
+ with :
24
+ python-version : 3.8
25
+ - name : Install nox
26
+ run : python -m pip install nox
27
+ - name : Run system tests
28
+ run : nox -s system-3.8
29
+ env :
30
+ SPANNER_EMULATOR_HOST : localhost:9010
31
+ GOOGLE_CLOUD_PROJECT : emulator-test-project
32
+ GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE : true
Original file line number Diff line number Diff line change @@ -94,7 +94,9 @@ def system(session):
94
94
system_test_folder_path = os .path .join ("tests" , "system" )
95
95
96
96
# Sanity check: Only run tests if the environment variable is set.
97
- if not os .environ .get ("GOOGLE_APPLICATION_CREDENTIALS" , "" ):
97
+ if not os .environ .get (
98
+ "GOOGLE_APPLICATION_CREDENTIALS" , ""
99
+ ) and not os .environ .get ("SPANNER_EMULATOR_HOST" , "" ):
98
100
session .skip ("Credentials must be set via environment variable" )
99
101
100
102
system_test_exists = os .path .exists (system_test_path )
You can’t perform that action at this time.
0 commit comments