File tree Expand file tree Collapse file tree 2 files changed +40
-2
lines changed Expand file tree Collapse file tree 2 files changed +40
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Serverless
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ env :
10+ CARGO_TERM_COLOR : always
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v2
17+ - name : Setup Python 2.7
18+ uses : actions/setup-python@v2
19+ with :
20+ python-version : ' 2.7'
21+ - name : Install scylla-ccm
22+ run : pip3 install https://github.com/scylladb/scylla-ccm/archive/master.zip
23+
24+ - name : Create serverless cluster
25+ run : |
26+ ccm create serverless -i 127.0.1. -n 1 --scylla -v release:5.1.6
27+ ccm start --sni-proxy --sni-port 7777
28+
29+ - name : Check
30+ run : cargo check --verbose
31+ - name : Run cloud example
32+ run : cargo run --example cloud -- $HOME/.ccm/serverless/config_data.yaml
33+
34+ - name : Remove serverless cluster
35+ run : ccm remove serverless
Original file line number Diff line number Diff line change 1+ use std:: env;
12use std:: path:: Path ;
23
34use anyhow:: Result ;
@@ -6,8 +7,10 @@ use scylla::CloudSessionBuilder;
67#[ tokio:: main]
78async fn main ( ) -> Result < ( ) > {
89 println ! ( "Connecting to SNI proxy as described in cloud config yaml ..." ) ;
9-
10- let session = CloudSessionBuilder :: new ( Path :: new ( "examples/config_data.yaml" ) )
10+ let config_path = env:: args ( )
11+ . nth ( 1 )
12+ . unwrap_or ( "examples/config_data.yaml" . to_owned ( ) ) ;
13+ let session = CloudSessionBuilder :: new ( Path :: new ( & config_path) )
1114 . unwrap ( )
1215 . build ( )
1316 . await
You can’t perform that action at this time.
0 commit comments