File tree Expand file tree Collapse file tree 3 files changed +41
-1
lines changed
packages/client_composition Expand file tree Collapse file tree 3 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 38
38
run : sleep 300
39
39
40
40
publish_clients :
41
- needs :
41
+ needs :
42
42
- check
43
43
- wait_for_core
44
44
strategy :
47
47
- packages/client_search
48
48
- packages/client_insights
49
49
- packages/client_recommend
50
+ - packages/client_composition
50
51
permissions :
51
52
id-token : write
52
53
uses : dart-lang/setup-dart/.github/workflows/publish.yml@v1
Original file line number Diff line number Diff line change
1
+ import 'package:algolia_client_composition/algolia_client_composition.dart' ;
2
+
3
+ void main () async {
4
+ // Creating an instance of the Composition client with the provided App ID and API key.
5
+ final composition = CompositionClient (
6
+ appId: 'latency' ,
7
+ apiKey: '6be0576ff61c053d5f9a3225e2a90f76' ,
8
+ );
9
+
10
+ await composition.search (
11
+ compositionID: "foo" ,
12
+ requestBody: RequestBody (
13
+ params: Params (
14
+ query: "batman" ,
15
+ ),
16
+ ),
17
+ );
18
+
19
+ // Close the client and dispose of all underlying resources.
20
+ composition.dispose ();
21
+ }
Original file line number Diff line number Diff line change
1
+ import 'dart:io' ;
2
+
3
+ import 'package:algolia_client_composition/src/version.dart' ;
4
+ import 'package:test/test.dart' ;
5
+
6
+ void main () {
7
+ if (Directory .current.path.endsWith ('/test' )) {
8
+ Directory .current = Directory .current.parent;
9
+ }
10
+ test ('package version matches pubspec' , () {
11
+ final pubspecPath = '${Directory .current .path }/pubspec.yaml' ;
12
+ final pubspec = File (pubspecPath).readAsStringSync ();
13
+ final regex = RegExp ('version:s*(.*)' );
14
+ final match = regex.firstMatch (pubspec);
15
+ expect (match, isNotNull);
16
+ expect (packageVersion, match? .group (1 )? .trim ());
17
+ });
18
+ }
You can’t perform that action at this time.
0 commit comments