File tree Expand file tree Collapse file tree 4 files changed +29
-6
lines changed Expand file tree Collapse file tree 4 files changed +29
-6
lines changed Original file line number Diff line number Diff line change 46
46
47
47
- name : Unit tests
48
48
run : |
49
- vendor/bin/phpunit -c phpunit.xml.dist
49
+ composer run-script test
50
50
env :
51
51
TEST_SUITE : free
52
-
52
+
53
+ - name : Configure sysctl limits
54
+ run : |
55
+ sudo swapoff -a
56
+ sudo sysctl -w vm.swappiness=1
57
+ sudo sysctl -w fs.file-max=262144
58
+ sudo sysctl -w vm.max_map_count=262144
59
+
60
+ - name : Runs Elasticsearch ${{ matrix.es-version }}
61
+ uses : elastic/elastic-github-actions/elasticsearch@master
62
+ with :
63
+ stack-version : ${{ matrix.es-version }}
64
+
65
+ - name : Integration tests
66
+ run : |
67
+ composer run-script integration-test
Original file line number Diff line number Diff line change 40
40
},
41
41
"scripts" : {
42
42
"test" : [
43
- " vendor/bin/phpunit"
43
+ " vendor/bin/phpunit --testdox "
44
44
],
45
45
"integration-test" : [
46
- " vendor/bin/phpunit -c phpunit-integration-tests.xml"
46
+ " vendor/bin/phpunit --testdox - c phpunit-integration-tests.xml"
47
47
],
48
48
"phpstan" : [
49
49
" phpstan analyse src --level 2 --no-progress"
Original file line number Diff line number Diff line change @@ -87,14 +87,14 @@ class ClientBuilder
87
87
88
88
/**
89
89
* SSL certificate
90
- * @param array [$cert, $password] $cert is the name of a file containing a PEM formatted certificate,
90
+ * @var array [$cert, $password] $cert is the name of a file containing a PEM formatted certificate,
91
91
* $password if the certificate requires a password
92
92
*/
93
93
private array $ sslCert ;
94
94
95
95
/**
96
96
* SSL key
97
- * @param array [$key, $password] $key is the name of a file containing a private SSL key,
97
+ * @var array [$key, $password] $key is the name of a file containing a private SSL key,
98
98
* $password if the private key requires a password
99
99
*/
100
100
private array $ sslKey ;
Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ public static function getHost(): ?string
62
62
if (false !== $ url ) {
63
63
return $ url ;
64
64
}
65
+ if (getenv ('TEST_SUITE ' ) === 'free ' ) {
66
+ return 'http://localhost:9200 ' ;
67
+ }
65
68
return 'https://localhost:9200 ' ;
66
69
}
67
70
@@ -70,6 +73,11 @@ public static function getHost(): ?string
70
73
*/
71
74
public static function getClient (): Client
72
75
{
76
+ if (getenv ('TEST_SUITE ' ) === 'free ' ) {
77
+ return ClientBuilder::create ()
78
+ ->setHosts ([self ::getHost ()])
79
+ ->build ();
80
+ }
73
81
return ClientBuilder::create ()
74
82
->setHosts ([self ::getHost ()])
75
83
->setBasicAuthentication ('elastic ' , 'changeme ' )
You can’t perform that action at this time.
0 commit comments